saraedum / forsake

GNU General Public License v3.0
0 stars 0 forks source link

Fully reparent forked process #7

Open saraedum opened 1 year ago

saraedum commented 1 year ago

On Linux we could actually fully reparent the forked process. The advantage would be that we don't have to do any hackery to make redirecting stdio work and we also don't have trouble forwarding signals that cannot be trapped. https://github.com/nelhage/reptyr is a project that does such reparenting. It requires some debugging capabilities to be enabled which in my experience is often not the case on shared systems.

roed314 commented 1 year ago

This would be cool, but I think that needing to disable a standard security feature means that this probably can't be the default approach, and if we need to write code to handle signals anyway I'm not sure if it's worth doing this.