system() return different value under 2.4.23 and 2.6.0-test11
From: fengxj
Date: Thu Dec 04 2003 - 00:02:02 EST
Hi, everyone
I just found a simple program:
-----------------------------
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
int main(void)
{
int ret;
signal(SIGCHLD, SIG_IGN);
ret = system("/bin/date 1>/dev/null");
printf("%d\n", ret);
return 0;
}
----------------------------
runs under 2.4.23 with ret = 0,
but under 2.6.0-test11, ret = -1.
Why?
And when i remove
signal(...)
it returns the same value 0.
I use Slackware 9.1 with GCC 3.2.3 and libc 2.3.2
Regards.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/