-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslow.c
40 lines (35 loc) · 795 Bytes
/
slow.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* ===========================================================================
*
* slow.c --
*
*
* Wolfram Schenck <[email protected]>
*
* Copyright (C) 2015
* Engineering Informatics
* Department of Engineering Sciences and Mathematics
* University of Applied Sciences Bielefeld
*
* 1.2 / 13. Oct 15 (ws)
*
*
* ===========================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main( int argc, char **argv, char **envp )
{
printf( "Waiting...\n" );
if( argc > 1 ) {
printf( "Arg: %s\n", argv[1] );
usleep( atoi( argv[1] )*1000000 );
_exit( atoi( argv[1] ) );
} else {
printf( "No argument given!\n" );
usleep( 3000000 );
_exit( 0 );
}
}