Project

General

Profile

« Previous | Next » 

Revision 9128

lib/sh/util.sh: streams: moved setting of global stdin/stdout/stderr into set_global_fds () function

View differences:

lib/sh/util.sh
323 323

  
324 324
# convention: use fd 10/11/12 for command-specific alternate stdin/stdout/stderr
325 325

  
326
# allow commands to access global stdin/stdout/stderr using fd 20/21/22
326
set_global_fds ()
327
# allows commands to access global stdin/stdout/stderr using fd 20/21/22
327 328
# this works even when /dev/tty isn't available
328
# ignore errors if a source fd isn't open
329
prefix=2
330
src=0 dir='<' shadow_fd || true
331
src=1 dir='>' shadow_fd || true
332
src=2 dir='>' shadow_fd || true
333
unset prefix
329
{
330
	echo_minor_func
331
	local prefix=2
332
	# ignore errors if a source fd isn't open
333
	src=0 dir='<' shadow_fd || true
334
	src=1 dir='>' shadow_fd || true
335
	src=2 dir='>' shadow_fd || true
336
}
337
set_global_fds
334 338

  
335 339

  
336 340
#### vars

Also available in: Unified diff