shithub: mq

Download patch

ref: 21b7055755ea046a61f462adf5d731bfb8505d1e
parent: 4ed0182344e4208435dcab556c87f503d5072e3b
author: kvik <kvik@a-b.xyz>
date: Sat Sep 12 09:06:59 EDT 2020

pin: regroup mq-cat with the main process

In rc(1) backgrounded programs get a new note group.
Since we want an interrupt note to clean up pin and all
its kids we need to regroup with the parent's note group.

--- a/rc/pin
+++ b/rc/pin
@@ -1,4 +1,4 @@
-#!/bin/rc -e
+#!/bin/rc
 rfork en
 
 flagfmt = 'n:noattach, w:write, m:mtpt mtpt'
@@ -43,4 +43,5 @@
 	exit
 echo attaching $mq >[1=2]
 mq-cat $mq &
+cat /proc/$pid/noteid >/proc/$apid/noteid
 exec cat >>$mq/0