Re: bug: erroronous ret-value for system() call in 2.6-kernel

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: niklas(dot)andersson(at)cport(dot)se
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: bug: erroronous ret-value for system() call in 2.6-kernel
Date: 2005-02-08 15:57:48
Message-ID: 6852.1107878268@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Niklas Andersson" <niklas(dot)andersson(at)cport(dot)se> writes:
> Had a curious problem with postgresql 7.0.3.

7.0.3? You do realize that that's prehistoric?

> Could create a DB if I run
> kernel 2.4 but not in 2.6. Had a look in
> /src/backend/commands/dbcommands.c and finaly found out that you use an
> errorounous ret value from the system()-call. You checked for: if
> (system(buf) != 0)

> .. I changed those lines to if (system(buf) != -1 ) and it worked. (Thanks
> to "man 3 system"

I don't believe this change is correct; what you did was to disable
detection of failures of the child process, ie, cp returning a nonzero
exit status.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-02-08 16:12:30 Re: SELECT returning too many rows (?)
Previous Message Tom Lane 2005-02-08 15:48:16 Re: BUG #1466: #maintenace_work_mem = 16384