Imported from ../bash-1.14.7.tar.gz.
This commit is contained in:
		
				commit
				
					
						726f63884d
					
				
			
		
					 402 changed files with 150297 additions and 0 deletions
				
			
		
							
								
								
									
										16
									
								
								CWRU/misc/open-files.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								CWRU/misc/open-files.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
#include <sys/types.h>
 | 
			
		||||
#include <fcntl.h>
 | 
			
		||||
#include <sys/file.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
main()
 | 
			
		||||
{
 | 
			
		||||
	register int	i;
 | 
			
		||||
 | 
			
		||||
	for (i = 0; i < getdtablesize(); i++) {
 | 
			
		||||
		if (fcntl(i, F_GETFD, 0) != -1)
 | 
			
		||||
			fprintf(stderr, "fd %d: open\n", i);
 | 
			
		||||
	}
 | 
			
		||||
	exit(0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue