shithub: riscv

Download patch

ref: 812e0fd0583f3306a8c170e7f59f7b12f5280e4e
parent: efc0780d866ae0590621b0d50bc413a517043bcd
author: cinap_lenrek <[email protected]>
date: Sat May 26 17:18:41 EDT 2012

hget/play: fix enviroment leaks

--- a/rc/bin/hget
+++ b/rc/bin/hget
@@ -1,4 +1,5 @@
 #!/bin/rc
+rfork e
 argv0=$0
 fn usage {
 	echo usage: $argv0 [ -o file ] [ -p body ] [ -r header ] [ -m method ] [ -b baseurl ] url >[1=2]
--- a/rc/bin/play
+++ b/rc/bin/play
@@ -1,4 +1,5 @@
 #!/bin/rc
+rfork e
 
 out=/dev/audio
 typ=()
--- a/sys/src/games/music/playlistfs/player.c
+++ b/sys/src/games/music/playlistfs/player.c
@@ -69,7 +69,7 @@
 	pfd->filename = file;	/* mallocated already */
 	pfd->fd = fd[1];
 	pfd->cfd = fd[0];
-	procrfork(decexec, pfd, 4096, RFFDG);
+	procrfork(decexec, pfd, 4096, RFFDG|RFENVG);
 	close(fd[1]);	/* write fd, for pac4dec */
 	return fd[0];	/* read fd */
 }