fix warning regarding null byte
This commit is contained in:
		@@ -71,9 +71,12 @@ if [ -f "$LOCK" ]; then
 | 
				
			|||||||
        printf "removing orphaned lock, pid %d does not exist\n" "$pid"
 | 
					        printf "removing orphaned lock, pid %d does not exist\n" "$pid"
 | 
				
			||||||
        rm -f "$LOCK"
 | 
					        rm -f "$LOCK"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        if [[ -f "/proc/${pid}/cmdline" ]] && ! [[ $(cat "/proc/${pid}/cmdline") =~ $(basename "$0") ]]; then
 | 
					        if [[ -f "/proc/${pid}/cmdline" ]]; then
 | 
				
			||||||
            printf "removing orphaned lock, pid %d belongs to another process\n" "$pid"
 | 
					            cmdline=$(tr "\0" " " <"/proc/${pid}/cmdline")
 | 
				
			||||||
            rm -f "$LOCK"
 | 
					            if ! [[ $cmdline =~ $(basename "$0") ]]; then
 | 
				
			||||||
 | 
					                printf "removing orphaned lock, pid %d belongs to another process\n" "$pid"
 | 
				
			||||||
 | 
					                rm -f "$LOCK"
 | 
				
			||||||
 | 
					            fi
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            KEEP_LOCK=1
 | 
					            KEEP_LOCK=1
 | 
				
			||||||
            error_exit "another job is running, pid=${pid}"
 | 
					            error_exit "another job is running, pid=${pid}"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user