#92 Segmentation fault when run from cron


I have a rexx script I wrote. The script runs fine from
the command line. When I attempt to run it via cron, I
get 1637 Segmentation fault

OS is SUSE Linux 9.1 and 9.3. I have tried both the
3.0 RPM and building it from source with equal results.

IBM's rexx for AIX had similar problems years ago
because of the different stdin/stdout when running from
a cron job



  • Graham_Lawrence

    Graham_Lawrence - 2005-09-11

    Logged In: YES

    I too have a segmentation fault trying to execute a Rexx
    script from cron. OS is Mandrake 9. I too built from the
    source. How do I overcome this problem?

  • Mark Hessling

    Mark Hessling - 2005-09-13

    Logged In: YES

    Please be a bit more specific about the nature of the Rexx
    script you are running. I ran a simple "hello world" program
    and it worked fine from cron.

  • Graham_Lawrence

    Graham_Lawrence - 2005-09-13

    Logged In: YES

    Mark, Here are some details about the problem:

    The crontab entry :

            • /home/graham/testrexx >/home/graham/test.log 2>&1

    testrexx :

    /usr/local/bin/rexx test.rex

    test.rex :

    / Display OS /
    Parse source opsys p2 xecname p4
    say 'opsys='opsys'.'
    say 'p2='p2
    say 'xecname='xecname'.'
    say 'p4='p4

    test.log :
    /home/graham/testrexx: line 1: 324 Segmentation fault
    /usr/local/bin/rexx test.rex

    Thanks for looking into the problem.


  • David Ashley

    David Ashley - 2005-09-21

    Logged In: YES

    This is a known problem related to bug 1190516. Redirection
    of the Rexx command line does not work in all cases.
    Unfortunately, the specific broken case is used by cron to
    redirect output from the cron job which in turn causes the
    seg fault. A fix has not yet been developed.

  • David Ashley

    David Ashley - 2005-11-10

    Logged In: YES

    This all may be related to a bug that was opened on Mod_Rexx
    with ooRexx on Linux. It appears that the location for the
    ooRexx installed executables (/usr/local/bin) is not in
    Cron's path on some Linux distributions. This is also true
    for Apache. Try adding the following line somewhere in
    Cron's startup script.

    export PATH=$PATH:/usr/local/bin:/usr/local/sbin

    Please let me knowif this fixes the problem.

  • Graham_Lawrence

    Graham_Lawrence - 2006-01-20

    Logged In: YES

    I'm sorry but it has taken me some time to get around to
    checking a suggested fix. I have put


    as the first line in the crontab and can now get my test
    pogram to work.

  • David Ashley

    David Ashley - 2006-03-01

    Logged In: YES

    The PATH problem should go away starting with version 3.1.0.
    ooRexx will install itself in /opt/ooRexx and create links
    in /usr/bin and usr/lib for its executables and librearies.



Cancel  Add attachments

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks