[PATCH] Add scm_remember_upto_here to functions using a port's fd.

2021-03-06 Thread Maxime Devos
Oops, I forgot to add myself to THANKS. Seems rather presumptive of me, but it's recommended by HACKING ... From b3fe19e393b88a5227f9f1b9e1f5de09985c4e3d Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sat, 6 Mar 2021 21:39:52 +0100 Subject: [PATCH] Add scm_remember_upto_here to functions using

[PATCH] Add scm_remember_upto_here to functions using a port's fd.

2021-03-06 Thread Maxime Devos
This prevents a garbage collection cycle at an inopportune time from closing a port while its file descriptor is still required. * libguile/filesys.c (scm_chown, scm_stat, scm_fcntl, scm_fsync, scm_sendfile) (scm_chmod): Add a scm_remember_upto_here after the system call is done with fhe fil

Re: Preventing file descriptor leak to execl'd processes

2021-03-06 Thread Maxime Devos
On Sat, 2021-03-06 at 17:55 +0100, Marius Bakke wrote: > Hello Guilers, > > [...] > > It works great, except that the script filename (/tmp/test-shell) has > an open file descriptor which leaks into the new process: > > [...] > > I've managed to work around it by setting FD_CLOEXEC on it: > >

Late Guile Potluck 2021 submission of ANGUISH

2021-03-06 Thread Rutger van Beusekom
guile-devel-requ...@gnu.org writes: Hi everyone, I would like to submit ANGUISH, another guile shell at https://gitlab.com/rutger.van.beusekom/anguish, for the potluck of this year. It is just the initial version that does not actually run you shell commands just yet, this will be the next step

Preventing file descriptor leak to execl'd processes

2021-03-06 Thread Marius Bakke
Hello Guilers, I recently had the insa^W bright idea of making my login shell a Guile script instead of fiddling so much with bashrc and the likes. For example, here is how I start my window manager when logging into TTY2 or TTY3: $ cat /tmp/test-shell #!/gnu/store/18hp7flyb3yid3yp49i6qcdq0sbi5l