Menu

#4 Wait() system call is not waiting

1.0
closed
None
2019-12-03
2019-12-02
No

Hi
Problem with the the Informix 4gl code RUN("sytem shell command") again
the dault is for it to wait() for the the process to complete.
But my testing is showing that it is not waiting

I will try and create a simple test C for you that generates the issue.

Howver, with ibcs ltrace on the 4gl code, shows **wait err return, **
if that means anything to you?

Below is a 4gl code frag highliting the issue.
the 4gl manual says the RUN "command" without any additional argumtes
wait s by default for the child process to end
so in the code below , th "rm"should happen after the "cat" completes
but my testin gis showimng that "cat" errors, occor most time, but not every time.
because the rm has removed the file before the cat cuns/complets.

FUNCTION cat_log_rm_tmp()

    LET gfilenm = "cat ", TMPLOGFILENAME, " >>", LOGFILENAME
    RUN gfilenm


      LET gfilenm = "rm ", TMPLOGFILENAME
    RUN gfilenm RETURNING run_val

    RETURN

END FUNCTION / cat_log_rm_tmp /

enableinhg thr traec the some c4gl cod
shoaut wait() is getting an error)

returns 0
cxenix()
sigaction(18, 0x0, 0xffa93de4)
sigaction returns 0 (edx:0)
fork()
fork returns 130332 (edx:130332)
wait(0xfffffd1c, 0xffa93e08, 0x0)
wait error return 10
cxenix()

Related

Tickets: #4

Discussion

  • Russell Stuart

    Russell Stuart - 2019-12-02

    Fork() is returning 130332. That would be a Process ID that is bigger than 15 bits. IBCS has no problem with it itself, but the systems it emulates had 15 bit PID's and the code it runs sometimes assumes that. The steps for telling the kernel to only use 16 bit PID's are in the man page.

     
  • Russell Stuart

    Russell Stuart - 2019-12-02
    • assigned_to: Russell Stuart
     
  • Rod Sheppard

    Rod Sheppard - 2019-12-03

    Hi Russell,
    That did the trick,
    there it was plain and clear in the man page, sorry should have read the man page.

    Rod
    -- reply above this line --


    Rodney Sheppard
    Software Engineer - Development Manager
    Trans-Mit Pty. Ltd.
    7 Wendy Court Hampton Park,
    Vic 3976, Australia
    Phone... +61 3 87878744
    Fax.........+61 3 87875722
    Email...... rod@transmit.com.au
    Web....... www.transmit.com.au



    ----- Original Message -----
    From: Russell Stuart
    To: [ibcs-us:tickets]
    Sent: Tuesday, December 03, 2019 9:46 AM
    Subject: [ibcs-us:tickets] #4 Wait() system call is not waiting

    Fork() is returning 130332. That would be a Process ID that is bigger than 15 bits. IBCS has no problem with it itself, but the systems it emulates had 15 bit PID's and the code it runs sometimes assumes that. The steps for telling the kernel to only use 16 bit PID's are in the man page.


    [tickets:#4] Wait() system call is not waiting

    Status: open
    Milestone: 1.0
    Created: Mon Dec 02, 2019 11:52 AM UTC by Rod Sheppard
    Last Updated: Mon Dec 02, 2019 11:52 AM UTC
    Owner: nobody

    Hi
    Problem with the the Informix 4gl code RUN("sytem shell command") again
    the dault is for it to wait() for the the process to complete.
    But my testing is showing that it is not waiting

    I will try and create a simple test C for you that generates the issue.

    Howver, with ibcs ltrace on the 4gl code, shows wait err return,
    if that means anything to you?

    Below is a 4gl code frag highliting the issue.
    the 4gl manual says the RUN "command" without any additional argumtes
    wait s by default for the child process to end
    so in the code below , th "rm"should happen after the "cat" completes
    but my testin gis showimng that "cat" errors, occor most time, but not every time.
    because the rm has removed the file before the cat cuns/complets.

    FUNCTION cat_log_rm_tmp()

    LET gfilenm = "cat ", TMPLOGFILENAME, " >>", LOGFILENAME
    RUN gfilenm
    
    
      LET gfilenm = "rm ", TMPLOGFILENAME
    RUN gfilenm RETURNING run_val
    
    RETURN
    

    END FUNCTION / cat_log_rm_tmp /

    enableinhg thr traec the some c4gl cod
    shoaut wait() is getting an error)

    returns 0
    cxenix()
    sigaction(18, 0x0, 0xffa93de4)
    sigaction returns 0 (edx:0)
    fork()
    fork returns 130332 (edx:130332)
    wait(0xfffffd1c, 0xffa93e08, 0x0)
    wait error return 10
    cxenix()


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ibcs-us/tickets/4/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Tickets: #4

  • Russell Stuart

    Russell Stuart - 2019-12-03
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB