Mail Archives: cygwin/2001/10/03/06:26:32
Robert Legros wrote:
>
> Hello,
>
> It is possible to create a Cygwin process whose ppid
> and pgid are both zero.
>
> If you type the following commands at the shell
> command prompt (bash or ash) :
> sh -c "sleep 10 &"
> ps
> you will see a process whose PPID and PGID are 0.
>
Yes you do but note that if the doublequote comes before the ampersand
the list is what you might expect.
$ sh -c " sleep 10" &
[1] 215
$ ps
PID PPID PGID WINPID TTY UID STIME COMMAND
205 1 205 205 con 1000 09:28:07 /usr/bin/rxvt
72 205 72 207 0 1000 09:28:07 /usr/bin/bash
215 72 215 170 0 1000 11:17:35 /usr/bin/sh
148 215 215 148 0 1000 11:17:35 /usr/bin/sleep
224 72 224 229 0 1000 11:17:36 /usr/bin/ps
Hope that helps.
Don Sharp
> I really do suppose it was not meant to allow such a
> thing. Normally, a detached process should have ppid
> and pgid with value 1. That's what does occur when you
> type the following commands :
> sleep 10 &
> ps
>
> Best Regards,
>
> =====
> Robert Legros
> south Brussels, Belgium
> robert_legros AT yahoo DOT com
>
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com
>
> ------------------------------------------------------------------------
>
> Cygnus Win95/NT Configuration Diagnostics
> Current System Time: Tue Oct 2 15:43:23 2001
>
> WinNT Ver 5.0 build 2195 Service Pack 1
>
> Path: /usr/local/bin
> /usr/bin
> /bin
> /cygdrive/c/WINNT/system32
> /cygdrive/c/WINNT
> /cygdrive/c/WINNT/System32/Wbem
> /cygdrive/c/Program Files/Symantec/pcAnywhere/
> .
>
> SysDir: C:\WINNT\System32
> WinDir: C:\WINNT
>
> PWD = `/home/rleg/project/cygwin/bug_001'
> USER = `rleg'
> MAKE_MODE = `unix'
> HOME = `/home/rleg'
>
> NUMBER_OF_PROCESSORS = `1'
> PROMPT = `$P$G'
> LOGONSERVER = `\\ZAV002361'
> OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
> COMSPEC = `C:\WINNT\system32\cmd.exe'
> !C: = `C:\cygwin\bin'
> SYSTEMDRIVE = `C:'
> HOSTNAME = `ZAV002361'
> PROCESSOR_REVISION = `080a'
> PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
> COMPUTERNAME = `ZAV002361'
> WINDIR = `C:\WINNT'
> USERPROFILE = `C:\Documents and Settings\rleg'
> PS1 = `\[\033]0;\w\007
> \033[32m\]\u@\h \[\033[33m\w\033[0m\]
> $ '
> PROGRAMFILES = `C:\Program Files'
> !:: = `::\'
> MACHTYPE = `i686-pc-cygwin'
> PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 10, GenuineIntel'
> OS = `Windows_NT'
> OLDPWD = `/home/rleg/project/cygwin/bug_001/cygwin-1.3.3-2/winsup/utils'
> PROCESSOR_ARCHITECTURE = `x86'
> TEMP = `/cygdrive/c/DOCUME~1/rleg/LOCALS~1/Temp'
> PROCESSOR_LEVEL = `6'
> SYSTEMROOT = `C:\WINNT'
> TMP = `/cygdrive/c/DOCUME~1/rleg/LOCALS~1/Temp'
> HOMEDRIVE = `C:'
> ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
> SHLVL = `1'
> APPDATA = `C:\Documents and Settings\rleg\Application Data'
> COMMONPROGRAMFILES = `C:\Program Files\Common Files'
> HOMEPATH = `\'
> USERDOMAIN = `ZAV002361'
> USERNAME = `rleg'
> SHELL = `/bin/bash'
> HOSTTYPE = `i686'
> OSTYPE = `cygwin'
> TERM = `cygwin'
> _ = `/usr/bin/cygcheck'
> TZ = `RST-1RDT-2,M3.5.0/2,M10.5.0/3'
>
> HKEY_CURRENT_USER\Software\Cygnus Solutions
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
> (default) = `/cygdrive'
> cygdrive flags = 0x00000022
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\Cygnus Solutions
> (default) = (unsupported type)
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
> (default) = `C:/cygwin'
> flags = 0x0000000a
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
> (default) = `C:/cygwin/bin'
> flags = 0x0000000a
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
> (default) = `C:/cygwin/lib'
> flags = 0x0000000a
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
>
> a: fd N/A N/A
> c: hd FAT32 19082Mb 22% CP UN
> d: cd N/A N/A
> e: net NTFS 17358Mb 97% CP CS UN PA FC soft
> f: net NTFS 6243Mb 75% CP CS UN PA FC data
>
> C:\cygwin\bin /usr/bin system binmode
> C:\cygwin\lib /usr/lib system binmode
> C:\cygwin / system binmode
> c: /cygdrive/c user binmode,noumount
> e: /cygdrive/e user binmode,noumount
> f: /cygdrive/f user binmode,noumount
>
> Found: C:\cygwin\bin\bash.exe
> Found: C:\cygwin\bin\cat.exe
> Found: C:\cygwin\bin\cpp.exe
> Found: C:\cygwin\bin\find.exe
> Found: C:\cygwin\bin\gcc.exe
> Found: C:\cygwin\bin\gdb.exe
> Found: C:\cygwin\bin\ld.exe
> Found: C:\cygwin\bin\ls.exe
> Found: C:\cygwin\bin\make.exe
> Found: C:\cygwin\bin\sh.exe
>
> 56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
> "cygbz21.0.dll" v0.0 ts=2000/11/21 0:53
> 81k 2000/12/05 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
> "cygitcl30.dll" v0.0 ts=2000/11/26 2:43
> 35k 2000/12/05 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
> "cygitk30.dll" v0.0 ts=2000/11/26 2:43
> 390k 2000/12/05 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
> "cygtcl80.dll" v0.0 ts=2000/11/26 2:39
> 5k 2000/12/05 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
> 10k 2000/12/05 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
> "cygtclreg80.dll" v0.0 ts=2000/11/26 2:39
> 623k 2000/12/05 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
> "cygtk80.dll" v0.0 ts=2000/11/26 2:43
> 18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
> "cyggdbm.dll" v0.0 ts=2000/10/23 4:26
> 21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
> "cygintl.dll" v0.0 ts=2001/6/20 19:09
> 45k 2001/07/04 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
> "cygjbig1.dll" v0.0 ts=2001/7/4 5:25
> 119k 2001/06/06 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
> "cygjpeg6b.dll" v0.0 ts=2001/6/6 6:27
> 163k 2001/05/06 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
> "cygpng2.dll" v0.0 ts=2001/5/6 6:05
> 45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
> "cygform5.dll" v0.0 ts=2001/4/25 7:28
> 26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
> "cygmenu5.dll" v0.0 ts=2001/4/25 7:27
> 156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
> "cygncurses++5.dll" v0.0 ts=2001/4/25 7:29
> 226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
> "cygncurses5.dll" v0.0 ts=2001/4/25 7:17
> 15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
> "cygpanel5.dll" v0.0 ts=2001/4/25 7:27
> 17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
> "cyghistory4.dll" v0.0 ts=2001/1/7 5:34
> 21k 2001/06/28 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
> "cyghistory5.dll" v0.0 ts=2001/6/28 4:27
> 108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
> "cygreadline4.dll" v0.0 ts=2001/1/7 5:34
> 135k 2001/06/28 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
> "cygreadline5.dll" v0.0 ts=2001/6/28 4:27
> 245k 2001/06/12 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
> "cygtiff3.dll" v0.0 ts=2001/6/12 19:25
> 41k 2001/07/04 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
> "cygXpm-noX4.dll" v0.0 ts=2001/7/4 3:21
> 45k 2001/07/04 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
> "cygXpm-X4.dll" v0.0 ts=2000/11/20 3:45
> 49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
> "cygz.dll" v0.0 ts=2001/2/3 21:35
> 701k 2001/09/13 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
> "cygwin1.dll" v0.0 ts=2001/9/13 5:54
> Cygwin DLL version info:
> dll major: 1003
> dll minor: 3
> dll epoch: 19
> dll bad signal mask: 19005
> dll old termios: 5
> dll malloc env: 28
> api major: 0
> api minor: 46
> shared data: 3
> dll identifier: cygwin1
> mount registry: 2
> cygnus registry name: Cygnus Solutions
> cygwin registry name: Cygwin
> program options name: Program Options
> cygwin mount registry name: mounts v2
> cygdrive flags: cygdrive flags
> cygdrive prefix: cygdrive prefix
> cygdrive default prefix:
> build date: Wed Sep 12 23:54:31 EDT 2001
> shared id: cygwin1S3
>
> Use -h to see help about each section
>
> ------------------------------------------------------------------------
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -