• issues with pipe/fork

    From candycane@VERT/CONCHAOS to All on Wed Aug 2 20:08:43 2023
    Hello!
    I'm having issues with pipe() and fork() making a 2 way pipe.
    The attached pastebin is somewhat far down in the function, and seemingly nothing happens when its run. The "done" puts() command isn't run either, it just returns with no error code. Any help?

    https://pastebin.com/KBnWKN9F

    candycane

    ===
    user is generated from /dev/urandom

    ...I'd rather have a bottle in front of me than a frontal lobotomy.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From Digital Man@VERT to candycane on Thu Aug 3 11:10:24 2023
    Re: issues with pipe/fork
    By: candycane to All on Wed Aug 02 2023 08:08 pm

    Hello!
    I'm having issues with pipe() and fork() making a 2 way pipe.
    The attached pastebin is somewhat far down in the function, and seemingly nothing happens when its run. The "done" puts() command isn't run either, it just returns with no error code. Any help?

    https://pastebin.com/KBnWKN9F

    In Synchronet, the source for the pipe/fork logic is in xtrn.cpp -> sbbs_t::external() (for *nix). Take a look at that for a working example.

    You haven't really described what you're trying to (what's the *goal* of your pipe and fork?).
    --
    digital man (rob)

    Sling Blade quote #5:
    Karl Childers (to father): You ought not killed my little brother...
    Norco, CA WX: 78.2øF, 48.0% humidity, 4 mph E wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From candycane@VERT/CONCHAOS to Digital Man on Thu Aug 3 21:52:39 2023
    Re: issues with pipe/fork
    By: Digital Man to candycane on Thu Aug 03 2023 11:10 am

    Re: issues with pipe/fork
    By: candycane to All on Wed Aug 02 2023 08:08 pm

    Hello!
    I'm having issues with pipe() and fork() making a 2 way pipe.
    The attached pastebin is somewhat far down in the function, and
    seemingly nothing happens when its run. The "done" puts() command
    isn't run either, it just returns with no error code. Any help?

    https://pastebin.com/KBnWKN9F

    In Synchronet, the source for the pipe/fork logic is in xtrn.cpp -> sbbs_t::external() (for *nix). Take a look at that for a working example.

    You haven't really described what you're trying to (what's the *goal* of your pipe and fork?).
    --
    digital man (rob)

    Sling Blade quote #5:
    Karl Childers (to father): You ought not killed my little brother... Norco, CA WX: 78.2øF, 48.0% humidity, 4 mph E wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net

    I was trying to do a bi directional pipe, like

    socket -> A -> rz
    rz -> B -> socket

    where rz's standard in/out are pointed to A and B.
    However, I ended up fixing it by myself, after a bunch of research.

    candycane

    ===
    user is generated from /dev/urandom

    ...Always address your elders with respect; they could leave you a fortune.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-