#904 queue use crashes rexx after sysfork child exits

v4.0
closed
None
5
2012-08-14
2010-04-16
DangerDan
No

In ooRexx 4.0.0 compiled and run on Slackware Linux 13 (only 64 bit libraries installed), using the SysFork() RexxUtil function sets up the interpreter to crash when the parent process uses a queue after the child (spawned) process exits.

!/opt/ooRexx/bin/rexx

PID=sysfork()
if PID=0 then do --CHILD
say 'bye bye'
end; else do --PARENT
say 'Queued()='queued();
say 'Queued()='queued();
say 'Hurrah!'
queue 'one'
parse pull T; say T
end
exit 0

On Slackware 12 (32 bit Linux) using ooRexx 3.2.0, the exit code is 0 and the result displayed is
bye bye
Queued()=0
Queued()=0
Hurrah!
one

With ooRexx 4.0.0, I get an exit code from rexx of 141 and the following display:
bye bye
Queued()=0

The only work-around I currently have is to create and request a mutex semaphore before the fork and not allow the child process to exit until parent releases it, which curiously doesn't work for ooRexx 3.2.0, because SysRequestMutexSem() could return 0 before the semaphore was released (and possibly before the timeout expired).

Discussion

  • Mark Miesfeld

    Mark Miesfeld - 2012-08-03

    Works fine for me under both ooRexx 4.1.1 and under trunk.

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-08-07

    Closing this as out of date as it works in both trunk and 4.1.1.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks