-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan Bron <[EMAIL PROTECTED]> writes:

> This:
>
>>,----[ .ijx snippet ]
>>|    shell './executbl.flename datafle.flname.in'
>>| '.' is not recognized as an internal or external command,
>>| operable program or batch file.
>>`----
>
> is due to the fact that shell (from tasks) is defined to use cmd.exe,
> not cygwin.  Even if you launched J from a cygwin shell, the shell
> verb is still going to invoke cmd.exe.

Thanks; that fixes one misperception I had.  Indeed, I can't execute
that command from a Windows Command Prompt, either; I get the same error
message.

> Try using the verb bash I provided.  Or maybe switch your slashes to
> backslashes.

Backslashes didn't make a difference; cmd couldn't deal with the ".",
nor could it find the cygwin dll.

I'm struggling with your bash verb right now:

,----[ I did change task.ijs ]
|    load'task'
|    CreateProcessF_jtask_
| 'kernel32 CreateProcessA i i *c i i i  i i *c *c *c'&cd
|    CreateProcess_jtask_
| 3 : 0
| 
| NB. stuff elided
|
| pi=. szero PROCESSINFO
| NB. 'r i1 c i2 i3 i4 f i5 i6 si pi'=. CreateProcessF 0;y;0;0;inh; f;0;0;si;pi
| if. 0 = L.y do. cwd=.<0 else. 'y cwd'=.y end.
| 'r i1 c i2 i3 i4 f i5 i6 si
| if. 0=r do. 0 return. end.
|
| NB. more stuff elided
|
| )
`----

I defined bash:

,----
| bash =: verb define
|           y spawn~ 'C:\cygwin\bin\bash.exe --login';'C:\cygwin\bin\'
|      )
`----

but it doesn't work, at least the way I'm guessing it should:

,----
|    bash 'ls'
| |domain error: cd
| |   'r i1 str i2 len i3'=.    WriteFile y;x;(#x);(sint 0);0
|    
`----

That's apparently in WriteAll:

,----[ WriteAll body ]
| WriteAll=: 3 : 0
| :
| while. #x do.
|   'r i1 str i2 len i3'=. WriteFile y;x;(#x);(sint 0);0
|   len=. int len
|   if. (0=r)+.0=len do.
|     'ec es'=: cderx''
|     if. -.ec e.0 109 do. ret=. _1 end.
|     break.
|   end.
|   x=. len}.x
| end.
| 1
| )
`----


,----[ A bit of debug ]
|    load'debug'
|    dbr 1
|    bash 'dir'
| |domain error: cd
| |cd[:0]
|       cd
| 15!:0
|       y
| 512
|       x
| +---------------------------------------------+
| ¦C:\cygwin\bin\bash.exe --login¦C:\cygwin\bin\¦
| +---------------------------------------------+
|       #x
| 2
|       sint
| 2&ic
|       sint 0
| 
|       ic
| 3!:4
|       WriteFile y;x;(#x);(sint 0);0
| |domain error: cd
| |cd[:0]
|       
`----

Some things do work:

,----
|    '+/i.3 4' spawn'jconsole'
|    12 15 18 21
|   fork 'notepad.exe'
|   shell'echo.|time' 
| The current time is: 15:04:54.27
| Enter the new time: 
|     (shell 'dir /b') shell 'find "*.ijs"'
| breaker.ijs
| profile.ijs
`----

Any clues?  I'll work through other suggestions people have sent in, but
the bash verb seemed to be the most promising.

Thanks,

Bill
- -- 
Bill Harris                      http://facilitatedsystems.com/weblog/
Facilitated Systems                              Everett, WA 98208 USA
http://facilitatedsystems.com/                  phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: For more information, see http://www.gnupg.org

iD8DBQFF51/A3J3HaQTDvd8RAvt9AJ900PWla+2UxceiCvg9CsuqH+A6QgCggSAH
5MnES9C+qtimtrwENk7LYKo=
=1oSQ
-----END PGP SIGNATURE-----

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to