ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

UNIXCMD and GIT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • UNIXCMD and GIT

    I am supposed to send GIT updates to a remote server using SSH. PASE must be used.
    I could do it simply by adding the job into the scheduler. But for mind gymnastics I decided to use Scott's UNIXCMD tool.

    I am using "UNIXPIPEOA" version, because I have V7R3M0 OS version.

    UNIXCMD works great for command like ls, cd etc.

    However, when I use GIT ( git push -u origin --all) I get errors:
    error: cannot create thread: Device busy
    fatal: send-pack: unable to fork off sideband demultiplexer

    and the second very uncomfortable problem is when the RPG tries to close a UNIX file (* INLR = * on). This I solved by close(e) UNIX file before * INLR.

    The UNIXCMD command description shows that example11 is compiled with the default activation group, it means with the old model. Is it really supposed to be this way?

    And more important, do you have any ideas for
    error: cannot create thread: Device busy
    fatal: send-pack: unable to fork off sideband demultiplexer

  • #2
    Originally posted by zukes1966 View Post
    However, when I use GIT ( git push -u origin --all) I get errors:
    error: cannot create thread: Device busy
    fatal: send-pack: unable to fork off sideband demultiplexer
    My guess is that you're running this in a job queue or subsystem that has a limited number of threads, so it can't create new threads?

    Originally posted by zukes1966 View Post
    and the second very uncomfortable problem is when the RPG tries to close a UNIX file (* INLR = * on). This I solved by close(e) UNIX file before * INLR.
    I'm not sure that I understand. What problem was this causing?

    Originally posted by zukes1966 View Post
    The UNIXCMD command description shows that example11 is compiled with the default activation group, it means with the old model. Is it really supposed to be this way?
    It should work with any activation group setting that you choose.

    Comment


    • #3
      However, when I use GIT ( git push -u origin --all) I get errors:
      error: cannot create thread: Device busy
      fatal: send-pack: unable to fork off sideband demultiplexer
      I run the comman/program interactively (QINTER).

      In fact, I found the cause. The problem is to use QIBM_USE_DESCRIPTOR_STID = 'I' and / or QIBM_PASE_DESCRIPTOR_STID = 'T' in UNIXPIPER4, which is the basis of the solution.
      GIT runs some threads and it won't cooperate QIBM _...
      So it seems I can not use GIT and UNIXCMD.
      I prepared a solution based on QP2SHELL without QIBM... redirection and it works.
      When I tried to use QIBM... on my solution, I got the same error.

      and the second very uncomfortable problem is when the RPG tries to close a UNIX file (* INLR = * on). This I solved by close(e) UNIX file before * INLR.
      My poor English .

      If there is a problem with the GIT's threads I wrote about earlier.
      UNIX CMD crashes with a fatal error when closing a UNIX file. I had to monitor it (close(e) UNIX before finish pgm).

      So, thank you for your help and time.

      Comment


      • #4
        Do you mean QIBM_USE_DESCRIPTOR_STDIO and QIBM_PASE_DESCRIPTOR_STDIO? Can you explain why these are causing problems?

        Comment


        • #5
          Today I can't check the names of environment variables(QIBM_USE_DESCRIPTOR_STDIO, QIBM_PASE_DESCRIPTOR_STDIO). I dont have a access to iSeries, but it is about variables which are implemented in UNIXCMD.

          I cannot explain this situation


          IBM describes these variables
          If the ILE environment variable QIBM_USE_DESCRIPTOR_STDIO is set to Y or I when the Qp2RunPase() API is called, PASE for i synchronizes file descriptors 0, 1, and 2 with the integrated file system so that both PASE for i and ILE C programs use the same descriptor numbers for files stdin, stdout, and stderr.

          I know that the GIT command do own job and finally starts a conversation in ssh.
          The problems appear exactly at starting ssh. I guess that, ssh is started in the next thread.

          So, I wrote my script where I call mentioned GIT command.
          If I execute this script using QP2SHELL without settings above QIBM... variables everythig works OK.
          If I run the same script and set QIBM... environment variables problems with threads arise.

          Comment

          Working...
          X