Discussion
Loading...

#Tag

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Felix Palmen :freebsd: :c64:
@zirias@mastodon.bsd.cafe  路  activity timestamp 5 months ago

Found an issue and fixed it. Turns out destroying my #Process instance when the child exited was wrong, there could still be unread data in the #pipe. But then, only waiting for #EOF on the pipe was equally wrong ...

Now the code does the only reliable thing:

* When the child terminated, close the pipe for stdin immediately if one was present
* Only destroy the process instance once the child terminated AND the pipes for #stdout and #stderr (IF they were present) found EOF.

Committed now:
https://github.com/Zirias/poser/commit/18051d9da0ba7e4caf2882828e5706e35d419f94

And here are the docs:
https://zirias.github.io/poser/api/latest/class_p_s_c___process.html

My testing code also had to change a bit and now makes for a completely pointless and cute wrapper around /bin/ls 馃檲 馃槀

#C #coding

The testing code in action
The testing code in action
The testing code in action
Some simple testing code for poser's new Process class
Some simple testing code for poser's new Process class
Some simple testing code for poser's new Process class
  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.0-rc.2.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login