have sh print prompt with write, not printf, to make
system call lecture a little clearer.
This commit is contained in:
		
							parent
							
								
									311479ceb7
								
							
						
					
					
						commit
						c3a17f454a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -134,7 +134,7 @@ runcmd(struct cmd *cmd)
 | 
			
		|||
int
 | 
			
		||||
getcmd(char *buf, int nbuf)
 | 
			
		||||
{
 | 
			
		||||
  fprintf(2, "$ ");
 | 
			
		||||
  write(1, "$ ", 2);
 | 
			
		||||
  memset(buf, 0, nbuf);
 | 
			
		||||
  gets(buf, nbuf);
 | 
			
		||||
  if(buf[0] == 0) // EOF
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue