Is there any way that I can have $pid the PID of .exe I am running.
No. Not whilst you need to do shell redirection: 2>&1.
In order to get shell redirection, you need a shell.
In reply to Re: Fork Opens CMD Not the Process
by BrowserUk
in thread Fork Opens CMD Not the Process
by anshumangoyal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |