nixpulvis / oursh

Your comrade through the perilous world of UNIX.
http://nixpulvis.com/oursh/oursh
MIT License
67 stars 6 forks source link

Bridge programs leave behind artifacts #17

Open nixpulvis opened 5 years ago

nixpulvis commented 5 years ago

We currently implement bridged programs as files in /tmp/oursh_bridge-<size>, but this is not a good idea. First of all history should be the only place we deal with old commands, and second, it's a data locking nightmare trying to negotiate for the same file. Worse, a program with the same interpreter and length will override the same program file, potentially causing catastrophic effect.

nixpulvis commented 5 years ago

This was implemented like this to actually make use of the systems #! functionality, however there's no real reason we can't create a Job with the correct executable path, and pipe the text into it. This should speed things up considerable as well.