Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Bob Harris <harris@zk3.dec.com>
Subject: Re: a question about system program
Date: Thu, 23 Aug 2001 09:21:51 -0400	[thread overview]
Message-ID: <230820010921513249%harris@zk3.dec.com> (raw)
In-Reply-To: a22a0b3c.0108230032.3685c937@posting.google.com

[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

In article <a22a0b3c.0108230032.3685c937@posting.google.com>, jing
<jing116@263.net> wrote:

X  When I use the function of 'setpgid(void)',it completed
X  sucessfully,but after this,I use 'setpgrp(void)',it return -1 .why
X  does this happened,and does it effect my program or system?
X  Thanks in advance!

But setpgid(pid,gid) takes 2 arguments!

Most likely the first time you called setpgid(void), register 16 and 17
(the 1st and 2nd call arguments) contained values that did not upset
setpgid(), although who knows what it actually did.

The second time you called setpgid(void), registers 16 and 17 most
likely contained values that setpgid() did not like.

While you really should fix the code to call the function correctly, if
you really Really REALLY want to know what it did not like, then fetch
the errno value.

        if ( setpgid(void) == -1 ) perror("setpgid doesn't like void");
        
                                        Bob Harris


  reply	other threads:[~2001-08-23 13:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-23  8:32 a question about system program jing
2001-08-23 13:21 ` Bob Harris [this message]
2001-08-24  1:38   ` jing
2001-08-24 13:26     ` Bob Harris
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox