Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

what is a negative number of file descriptors?

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

  • what is a negative number of file descriptors?

    Gene, I'm pretty sure that a -1 or whatever, means that your program cannot open the file or socket it's trying to bind to. At least that's what it means when you do an open() or read() on a file in the IFS normally.

  • #2
    what is a negative number of file descriptors?

    The example is misleading. In the example fd_map is NULL which causes spawn() to ignore fd_count and do simple inheritance. If fd_map were not NULL then EINVAL should be returned as -1 is not a valid value for fd_count. As fd_count is ignored in the sample spawn() call, I'm not real sure what value might make more sense to use in the example. Do you have any thoughts on what value to use in this situation?

    Comment


    • #3
      what is a negative number of file descriptors?

      I wondered if fd_count value -1 had special significance over value 0 when fd_map was NULL. It doesn't. Thanks, Bruce.

      Comment


      • #4
        what is a negative number of file descriptors?

        Can any help in identifying what the parms on the Spawn API are used for and what they should be populated with. I'm trying to create a spawn job with a specific name and to call a specific program. All the IBM examples refer to C my background is primarily RPG

        Comment


        • #5
          what is a negative number of file descriptors?


          Code

          Comment


          • #6
            what is a negative number of file descriptors?

            The second parameter on spawn() API, the number of inheritable file descriptors, can have a value from zero to the system maximum, according to the System API Reference. Yet the Sockets Programming Reference shows a value of -1 for this parameter (in appendix C, server givedescriptor()example). What does a negative number of file descriptors mean?

            Comment


            • #7
              what is a negative number of file descriptors?

              Tom, Thanks for you outline program. The entry list for the child program has variable SD_In which is 10 long. I'm having problems defining the code that will populate the ArgV2 var and the subsequently using SD_IN as a Socket Descriptor in the child program. I believe I'm overlooking something quite fundamental. I would be grateful if you could and are able to e-mail a server and child program so that I can have a better look at what you done. kerai.vinod@ntlworld.com Thanks

              Comment

              Working...
              X