lkml.org 
[lkml]   [2003]   [Dec]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 04 Dec 2003 13:01:09 +0800
Fromfengxj <>
Subjectsystem() return different value under 2.4.23 and 2.6.0-test11
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:59    [from the cache]
©2003-2008