I think it happens on jconsole for both J6 and J7. Here are my results for J6. Basically, it looks like the way windows fork is coded leaves the old and new console tasks both connected to the same STDIN and STDOUT. You can see that the same input stream is talking to both task 3600 and task 2926. After the fork, I had to issue "exit ''" twice to close the console window.
JVERSION Installer: j602a_win.exe Engine: j602/2008-03-03/16:45 Library: 6.02.057 9!:6 '' ΓöîΓö¼ΓöÉΓö£Γö╝ΓöñΓööΓö┤ΓöÿΓöéΓöÇ 9!:7 '+++++++++|-' 2!:6 '' 3600 load'files' load'task' 'FOO=: 1' fwrite 'testFork.ijs' 7 1!:43'' C:\Users\me\j602\bin FOO=:0 JEXE=:'jconsole.exe ' FOO 0 fork JEXE,'testFork.ijs' (2!:6'');FOO +----+-+ |3600|0| +----+-+ (2!:6'');FOO ΓöîΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÉ Γöé2696Γöé1Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÿ exit'' (2!:6'');FOO ΓöîΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÉ Γöé2696Γöé1Γöé ΓööΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÿ exit'' On 1/11/2012 13:01, Devon McCormick wrote: > Hi - > > I mentioned this issue at the NYCJUG meeting last night and am not sure I > was believed: when I fork a process from J7 jconsole, the forked process > affects the environment of the forking session. Here's a simple example - > I'd like to know if other people see the same issue in different OSs: > > 'FOO=: 1' fwrite 'testFork.ijs' > 7 > FOO=: 0 > JEXE=: 'C:\Program Files (x86)\j64-701\bin\jconsole.exe ' NB. Windows 7 > FOO > 0 > fork JEXE,'testFork.ijs' > FOO > 1 > > fork > fork_jtask_ > fork_jtask_ > 3 : 0 > 0 fork y > : > ph=. CreateProcess y > if. x do. Wait ph;x end. > CloseHandle ph > empty'' > ) > JVERSION > Engine: j701/2011-01-10/11:25 > Library: 7.01.052 > Platform: Win 64 > Installer: j701a_win64.exe > InstallPath: c:/program files (x86)/j64-701 > > This doesn't happen in J6 - "FOO" stays assigned to zero. Also, if I > ensure that the forked process signs out, "FOO" retains the value assigned > in the invoking session: > > ('FOO=: 1',LF,'2!:55 ''''') fwrite 'testFork.ijs' > 16 > FOO=: 0 > fork JEXE,'testFork.ijs' > |value error: JEXE > | fork JEXE,'testFork.ijs' > NB. "JEXE" no longer exists because my earlier "fork" created a new > environment in which it's not defined. > JEXE=: 'C:\Program Files (x86)\j64-701\bin\jconsole.exe ' NB. Windows 7 > FOO > 0 > fork JEXE,'testFork.ijs' > FOO > 0 > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm