From: BGINFO4X <bgi...@kz...> - 2013-12-12 18:02:18
|
> It is. If I open two MSYS shell windows, and run (say) 'sleep 120' in > one of them, then 'ps -ef' in the other, I see two sh.exe processes > running, with sleep.exe as a child of one of them. Two sh.exe and one > sleep.exe process also show up in Windows Task Manager, so I don't know > what your SysInternals Process Explorer is doing there. Yes, your are right. Sysinternal Process Explorer doesn't report sleep as a child. But it is a child: killing the sh.exe kills also the child sleep. > 2- When msys starts, Is it possible to launch a shell script without > spawning two shell processes? > If you source the script, it should run in the context of the primary > shell; try: > start /bin/sh.exe --login -c 'source path/to/script args ...' > (However, I don't think -c and -i can be used together successfully). source command is OK, and the -i option removed. Thanks again and Regards. -- Regards, Keith. 2013/12/10 BGINFO4X <bgi...@kz...> > Hello to everyone, I have some questions regarding to process: > > > 1- Is there anyway to create a process like "sleep 300" inside the bash > shell, where the winpid be a child process of the sh.exe itself? > > If I execute sleep, sysinternals process explorer reports that the WIN- > PPID of sleep is nonexistent, and in my opinion should be a "child" > process of sh.exe > > > > 2- When msys starts, Is it possible to launch a shell script without > spawning two shell processes? > > I have a sentence like: start "BGINFO4X for Windows" /HIGH "%WD%sh" -- > login -i -c "./BGINFO4X.sh" > > Is it possible something like: start "BGINFO4X for Windows" /HIGH "%WD%sh > -c ./BGINFO4X.sh" > spawning only a process instead of two? > > > Sorry for my ignorance. I appreciate your help. > > Thanks a lot. > > > |