filter via shell pipeline
Instead of requiring an executable, allow building arbitrary shell pipelines to filter filetypes through.
This commit is contained in:
		
				
					committed by
					
						 Markus Teich
						Markus Teich
					
				
			
			
				
	
			
			
			
						parent
						
							11f2c648eb
						
					
				
				
					commit
					54daf38b08
				
			
							
								
								
									
										4
									
								
								sent.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								sent.c
									
									
									
									
									
								
							| @ -152,8 +152,8 @@ filter(int fd, const char *cmd) | |||||||
| 		dup2(fds[1], 1); | 		dup2(fds[1], 1); | ||||||
| 		close(fds[0]); | 		close(fds[0]); | ||||||
| 		close(fds[1]); | 		close(fds[1]); | ||||||
| 		execlp(cmd, cmd, (char *)0); | 		execlp("sh", "sh", "-c", cmd, (char *)0); | ||||||
| 		eprintf("execlp %s:", cmd); | 		eprintf("execlp sh -c '%s':", cmd); | ||||||
| 	} | 	} | ||||||
| 	close(fds[1]); | 	close(fds[1]); | ||||||
| 	return fds[0]; | 	return fds[0]; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user