mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: fengxj <fengxiangjun@neusoft.com>
To: linux-kernel@vger.kernel.org
Subject: system() return different value under 2.4.23 and 2.6.0-test11
Date: Thu, 04 Dec 2003 13:01:09 +0800	[thread overview]
Message-ID: <00b801c3ba23$a3115670$1801010a@fengxj> (raw)


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.

             reply	other threads:[~2003-12-04  4:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-04  5:01 fengxj [this message]
2003-12-04 10:21 ` Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00b801c3ba23$a3115670$1801010a@fengxj' \
    --to=fengxiangjun@neusoft.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®