chiark / gitweb /
[PATCH] cleanup callout fork
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Thu, 11 Mar 2004 09:36:12 +0000 (01:36 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:35:09 +0000 (21:35 -0700)
commit35b38379bac87ebf4d0cc6884feff588ee859d5f
treedbc219e051505ba97d1be22d34ca4caa3051ad42
parenta3b37a073d52ff01d4ef023a10f13316da4c9966
[PATCH] cleanup callout fork

Here I change the callout fork logic.
The current cersion is unable to read a pipe which is not flushed at once,
Now we read until it's closed.

The maximum argument count is calculated by the strlen now. We have 100
chars for our result buffer so we can't have more than 50 parameters.
So it's much more clear what will happen now and not some magic boundary
where we use shell behind it.

Parameter can be combined to one by using apostrophes.

this on works now:
  BUS="scsi", PROGRAM="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed  s/foo9/bar9/'", KERNEL="sda3", NAME="%c{7}"

Two new test are also added.
namedev.c
namedev.h
test/udev-test.pl