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_at_doctor.zk3.dec.com
Serguei Patchkovskii <patchkov_at_ucalgary.ca>
dsr_at_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_at_sql.de
Received on Wed Jan 12 2000 - 09:21:43 NZDT