Subject: bin/8868: pax(1) fails on SIGINFO
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itohy@netbsd.org>
List: netbsd-bugs
Date: 11/23/1999 18:54:44
>Number:         8868
>Category:       bin
>Synopsis:       pax(1) fails on SIGINFO
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 23 18:54:01 1999
>Last-Modified:
>Originator:     ITOH Yasufumi
>Organization:
	
>Release:        1.4P source (Nov. 22, 1999)
>Environment:
System: NetBSD pino.my.domain 1.4K NetBSD 1.4K (PINO-pnpbios) #2: Thu Oct 7 17:44:44 JST 1999 itohy@pino.my.domain:/usr/src/sys.pnpbios/arch/i386/compile/PINO-pnpbios i386


>Description:
	pax may sometimes stop dumping an archive on SIGINFO,
	especially when the output is a pipe.

	It seems this is because the write(2) does not restart
	the partial write after signals.

>How-To-Repeat:
	Note that the SIGINFO is raised by the tty input.
	The statistical information is what is expected,
	but it should not stop the output.

	% stty status '^T'
	% pax -w /usr/bin | cat >/dev/null
	pax: Removing leading / from absolute path names in the archive

	[[ press ^T several times ]]

	load: 0.59  cmd: pax 3883 [running] 0.02u 0.12s 0% 388k
	Working on `usr/bin/gunzip' (98304 bytes)
	ustar vol 0, 4 files, 0 bytes read, 163840 bytes written in 1 secs (163840 bytes/sec)
	pax: WARNING: partial archive write. Archive MAY BE FLAWED

	ATTENTION! pax archive volume change required.
	Ready for archive volume: 2
	Input archive name or "." to quit pax.
	Archive name > 

>Fix:
	Handle partial write(2) properly.
>Audit-Trail:
>Unformatted: