Note that "fork" is an alien concept, under windows.  (And I do not
really understand how it works there.)  And I expect that this issue
is "windows only".

That said, I would not be surprised if what you are illustrating here
were to cause J to crash, under different circumstances.

-- 
Raul


On Wed, Jan 11, 2012 at 1:01 PM, Devon McCormick <devon...@gmail.com> 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
>
> --
> Devon McCormick, CFA
> ^me^ at acm.
> org is my
> preferred e-mail
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to