This is the sort of problem that we have to flush out in this beta.
spawn_jtask_ calls CreateProcess_jtask_, which is:
CreateProcess_jtask_
3 : 0
'' CreateProcess y
:
'ow ir'=. 2{.x,0
si=. szero STARTUPINFO
si=. (sint #STARTUPINFO) 'Cbyt' sset STARTUPINFO si
f=. inh=. 0
if. +/ir,ow do.
inh=. 1
f=. CREATE_NEW_CONSOLE
si=. (sint STARTF_USESTDHANDLES+STARTF_USESHOWWINDOW) 'Flag' sset
STARTUPINFO si
if. ow do.
si=. (sptr ow) Outh sset STARTUPINFO si
si=. (sptr ow) Errh sset STARTUPINFO si
end.
if. ir do. si=. (sptr ir) Inph sset STARTUPINFO si end.
end.
pi=. szero PROCESSINFO
r=. CreateProcessF 0;(uucp y);0;0;inh; f;0;0;si;pi
if. 0=r do. 0 return. end.
ph=. ptr Proh sget PROCESSINFO pi NB. pi should be _1{::r
th=. ptr Thrh sget PROCESSINFO pi NB. pi should be _1{::r
CloseHandle th
ph
)
In earlier releases the program could call CreateProcessF and expect the
name pi to hold a modified result. Now pi will be unchanged, and the
program needs to fish the modified value out of r.
Earlier in jtask there an another example, in CreatePipe, which shows
why we had to make the incompatible change in J8.07:
3 : 0
'inh size'=. 2{.y,0
sa=. szero SECURITYATTR
sa=. (sint #SECURITYATTR) 'Cbyt' sset SECURITYATTR sa
sa=. (sint *inh) 'Inhe' sset SECURITYATTR sa
r=. CreatePipeF (hRead=.,_1);(hWrite=.,_1);sa;sizeNB. overwriting ,_1
would be catastrophic
hRead=. {. hRead NB. must be (1;0){::r
hWrite=. {. hWrite NB. must be (2;0){::r
if. 1=inh do. hRead=. DuplicateHandle hRead end.
if. 2=inh do. hWrite=. DuplicateHandle hWrite end.
hRead,hWrite
)
The program created a name hRead, assigned it the value (,_1), and
passed that to CreatePipe, expecting it to be modified. All fine for
8.06, but in 8.07 (,_1) may implemented as a virtual block, just a
pointer to the data. In that case the CreatePipe would be overwriting
the system's copy of _1, which would be the first step down a path of no
return. 8.07 protects you from such a disaster, but you have to change
the program to pull the result value out of the result area.
Henry Rich
PS I don't own jtask & have not made any changes to its code.
hr
On 4/22/2018 9:09 AM, David Mitchell wrote:
I ran into this problem with beta-d:
z=.spawn_jtask_ 'exiftool -overwrite_original_in_place -all= "',q,'"'
z
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
beta-c:
z=.spawn_jtask_ 'exiftool -overwrite_original_in_place -all= "',q,'"'
z
1 directories scanned
21 image files updated
The tool ran correctly in beta-d and updated the 21 files. The
problem was with the returned result.
On 4/19/2018 13:42, Eric Iverson wrote:
807 beta-d zip install packages for windows/linux/macos are available.
This release starts to show some of the performance improvements made
possible by the foundation laid in previous beta releases.
See: http://code.jsoftware.com/wiki/System/ReleaseNotes/J807
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by AVG.
http://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm