tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: setpgrp: Deviation from manual
@ 2000-01-12  9:22 Joerg Bruehe
  0 siblings, 0 replies; only message in thread
From: Joerg Bruehe @ 2000-01-12  9:22 UTC (permalink / raw)
  To: tru64-unix-managers

Greetings ! 

I had asked in this list:
> 
> Dear admins,
> 
> I just encountered a programming problem (Tru64 4.0D):
> 
> According to my understanding of 'man setpgrp',
> this function can be called either without any parameters
> (current standard) or with 2 (old, for backwards compatibility);
> and without parameters it is said not to return any errors
> (= cannot fail).
> 
> I called it without parameters, and I got the return code '-1'
> and the errno value 'ESRCH'.
> 
> So I ask:
> - Did I misunderstand the manual ?
> - Do I need some C "define" to get the no-param-version to work ?

Fast as usual, I got responses from 
   Dr. Thomas P. Blinn    tpb@doctor.zk3.dec.com 
   Serguei Patchkovskii   <patchkov@ucalgary.ca> 
   dsr@mail.lns.cornell.edu   (Daniel S. Riley)
       
They all agree that I need to define _XOPEN_SOURCE_EXTENDED 
as a cpp symbol in order to get the new, parameter-less version 
of 'setpgrp' - I will follow that advice. 

Dr. Thomas P. Blinn also wrote that this "define" will cause 
'setpgrp' to be (internally) renamed to '_Esetpgrp', detectable 
by the 'strings' command (probably 'nm' as well ?) on the linked 
program (and the object module ?). 

Daniel S. Riley also wrote that using '-std1' as a compiler 
option would cause a warning (too few arguments) in such code, 
however I do use that option and get no warnings - there must 
be some other condition missing in my case. 

Again, thank you all for your prompt and helpful responses. 

Regards, 
Joerg Bruehe 

-- 
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-01-12  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-12  9:22 SUMMARY: setpgrp: Deviation from manual Joerg Bruehe

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