From 35b38379bac87ebf4d0cc6884feff588ee859d5f Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Thu, 11 Mar 2004 01:36:12 -0800 Subject: [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. --- test/udev-test.pl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/udev-test.pl b/test/udev-test.pl index 38ea0181f6..dadec568ba 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -259,6 +259,24 @@ EOF expected => "foo9" , conf => < "program with subshell", + subsys => "block", + devpath => "block/sda/sda3", + expected => "bar9" , + conf => < "program arguments combined with apostrophes", + subsys => "block", + devpath => "block/sda/sda3", + expected => "foo7" , + conf => <