listings/chapter-3/system.c
raw| 1 | /*********************************************************************** |
| 2 | * Code listing from "Advanced Linux Programming," by CodeSourcery LLC * |
| 3 | * Copyright (C) 2001 by New Riders Publishing * |
| 4 | * See COPYRIGHT for license information. * |
| 5 | ***********************************************************************/ |
| 6 | |
| 7 | #include <stdlib.h> |
| 8 | |
| 9 | int main () |
| 10 | { |
| 11 | int return_value; |
| 12 | return_value = system ("ls -l /"); |
| 13 | return return_value; |
| 14 | } |
| 15 |