OOPS Re: Patch to binfmt_script to support arbitrary interpreters

Bradley Broom (broom@fit.qut.edu.au)
Thu, 16 May 1996 00:57:36 +1000 (EST)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-851401618-832172256=:15235
Content-Type: TEXT/PLAIN; charset=US-ASCII

Ooops. My previous patch didn't iput the inode when executing a non-script.
I only found out when I shut the system down.

The attached patch is corrected.

My apologies.

Dr. Bradley Broom,
School of Data Communications, Email: broom@fit.qut.edu.au
Queensland University of Technology, Bus. : +61 7 3864 2769
GPO Box 2434, Brisbane, 4001, Australia. Fax : +61 7 3221 2384

---559023410-851401618-832172256=:15235
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patch
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SOL.3.91.960516005736.15235B@bohr.fit.qut.edu.au>
Content-Description: fixed patch

LS0tIGxpbnV4L2ZzL2V4ZWMuYy5vbGQJV2VkIE1heSAxNSAyMzowODowMCAx
OTk2DQorKysgbGludXgvZnMvZXhlYy5jCVdlZCBNYXkgMTUgMjM6MDg6MDYg
MTk5Ng0KQEAgLTYzLDE5ICs2MywyNCBAQA0KIA0KIHZvaWQgYmluZm10X3Nl
dHVwKHZvaWQpDQogew0KLSNpZmRlZiBDT05GSUdfQklORk1UX0VMRg0KLQlp
bml0X2VsZl9iaW5mbXQoKTsNCi0jZW5kaWYNCisJLyogVGhpcyBjYW5ub3Qg
YmUgY29uZmlndXJlZCBvdXQgb2YgdGhlIGtlcm5lbCAqLw0KKwkvKiBGb3Jt
YXRzIGFyZSBhY3R1YWxseSB0cmllZCBpbiB0aGUgcmV2ZXJzZSBvcmRlciBv
Zg0KKwkgKiByZWdpc3RyYXRpb24sIGFuZCBzY3JpcHQgZm9ybWF0IG11c3Qg
YmUgdGhlIGxhc3Qgb25lDQorCSAqIHRyaWVkLg0KKwkgKi8NCisJaW5pdF9z
Y3JpcHRfYmluZm10KCk7DQ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