FOSSology  4.4.0
Open Source License Compliance by Open Source Software
wait_special.c
Go to the documentation of this file.
1 /*
2  SPDX-FileCopyrightText: © 2012 Hewlett-Packard Development Company, L.P.
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 /* fossology includes */
8 #include <libfossology.h>
9 
11 #define MINUTES_TO_WAIT 1
12 
27 int main(int argc, char** argv)
28 {
29  int i;
30 
31  fo_scheduler_connect(&argc, argv, NULL);
32  fo_scheduler_set_special(SPECIAL_NOKILL, 1);
33 
34  for(i = 0; i < MINUTES_TO_WAIT; i++)
35  sleep(60);
36 
37  fo_scheduler_set_special(SPECIAL_NOKILL, 0);
38 
39  for(i = 0; i < MINUTES_TO_WAIT; i++)
40  sleep(60);
41 
44 
45  return 0;
46 }
47 
48 
49 
50 
The main FOSSology C library.
void fo_scheduler_disconnect(int retcode)
Disconnect the scheduler connection.
void fo_scheduler_set_special(int option, int value)
Sets something special about the agent within the scheduler.
char * fo_scheduler_next()
Get the next data to process from the scheduler.
void fo_scheduler_connect(int *argc, char **argv, PGconn **db_conn)
Establish a connection between an agent and the scheduler.
#define MINUTES_TO_WAIT
the number of minutes to wait before closing
Definition: wait_special.c:11