qvm-copy-to-vm2.kde: prepare for a race in PROGRESS_FILE creation
Apparently a tight race may happen when PROGRESS_FILE has been created, but not yet written to by qfile-agent. Check if its content are sane before use.
This commit is contained in:
		
							parent
							
								
									93e5b749fd
								
							
						
					
					
						commit
						7ac754eb63
					
				| @ -34,6 +34,7 @@ while ! [ -s $PROGRESS_FILE ] ; do | |||||||
| done | done | ||||||
| while true ; do | while true ; do | ||||||
| 	read agentpid sentsize agentstatus < $PROGRESS_FILE | 	read agentpid sentsize agentstatus < $PROGRESS_FILE | ||||||
|  | 	if [ "x"$agentstatus = x ] ; then continue ; fi | ||||||
| 	if ! [ -e /proc/$agentpid ] ; then break ; fi | 	if ! [ -e /proc/$agentpid ] ; then break ; fi | ||||||
| 	if [ "x"$agentstatus = xdone ] ; then break ; fi | 	if [ "x"$agentstatus = xdone ] ; then break ; fi | ||||||
| 	CURRSIZE=$(($sentsize/1024)) | 	CURRSIZE=$(($sentsize/1024)) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rafal Wojtczuk
						Rafal Wojtczuk