shell: fix script's comm field if ENABLE_FEATURE_PREFER_APPLETS=y
function old new delta re_execed_comm - 46 +46 main 72 86 +14 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 60/0) Total: 60 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
		
							
								
								
									
										6
									
								
								shell/ash_test/ash-comm/comm.right
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								shell/ash_test/ash-comm/comm.right
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| ./SCRIPT.sh: | ||||
|   /proc/N/comm: SCRIPT.sh | ||||
| exec ./SCRIPT.sh: | ||||
|   /proc/N/comm: SCRIPT.sh | ||||
| sh ./SCRIPT.sh: | ||||
|   /proc/N/comm: ash | ||||
							
								
								
									
										20
									
								
								shell/ash_test/ash-comm/comm.tests
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								shell/ash_test/ash-comm/comm.tests
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| { | ||||
| echo "#!$THIS_SH" | ||||
| echo 'procdir=/proc/$$' | ||||
| #echo 'echo "  /proc/N/exe:  $(basename $(readlink $procdir/exe))"' | ||||
| echo 'echo "  /proc/N/comm: $(cat $procdir/comm)"' | ||||
| } >SCRIPT.sh | ||||
| chmod 755 SCRIPT.sh | ||||
|  | ||||
| # comm field was wrong if CONFIG_FEATURE_PREFER_APPLETS=y | ||||
| echo './SCRIPT.sh:' | ||||
| ./SCRIPT.sh | ||||
|  | ||||
| # comm field was wrong if CONFIG_FEATURE_PREFER_APPLETS=y | ||||
| echo 'exec ./SCRIPT.sh:' | ||||
| (exec ./SCRIPT.sh) | ||||
|  | ||||
| echo 'sh ./SCRIPT.sh:' | ||||
| $THIS_SH ./SCRIPT.sh | ||||
|  | ||||
| rm SCRIPT.sh | ||||
							
								
								
									
										6
									
								
								shell/hush_test/hush-comm/comm.right
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								shell/hush_test/hush-comm/comm.right
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| ./SCRIPT.sh: | ||||
|   /proc/N/comm: SCRIPT.sh | ||||
| exec ./SCRIPT.sh: | ||||
|   /proc/N/comm: SCRIPT.sh | ||||
| sh ./SCRIPT.sh: | ||||
|   /proc/N/comm: hush | ||||
							
								
								
									
										20
									
								
								shell/hush_test/hush-comm/comm.tests
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								shell/hush_test/hush-comm/comm.tests
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| { | ||||
| echo "#!$THIS_SH" | ||||
| echo 'procdir=/proc/$$' | ||||
| #echo 'echo "  /proc/N/exe:  $(basename $(readlink $procdir/exe))"' | ||||
| echo 'echo "  /proc/N/comm: $(cat $procdir/comm)"' | ||||
| } >SCRIPT.sh | ||||
| chmod 755 SCRIPT.sh | ||||
|  | ||||
| # comm field was wrong if CONFIG_FEATURE_PREFER_APPLETS=y | ||||
| echo './SCRIPT.sh:' | ||||
| ./SCRIPT.sh | ||||
|  | ||||
| # comm field was wrong if CONFIG_FEATURE_PREFER_APPLETS=y | ||||
| echo 'exec ./SCRIPT.sh:' | ||||
| (exec ./SCRIPT.sh) | ||||
|  | ||||
| echo 'sh ./SCRIPT.sh:' | ||||
| $THIS_SH ./SCRIPT.sh | ||||
|  | ||||
| rm SCRIPT.sh | ||||
		Reference in New Issue
	
	Block a user