From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079271218496.tru64-unix-managers.marc@archive.invalid> From: Joerg Bruehe Date: Wed, 12 Jan 2000 09:22:06 +0000 To: tru64-unix-managers Subject: SUMMARY: setpgrp: Deviation from manual X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079271218496 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 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