blob: 21b2d75a2815c04584dcec945a93fd7e57857f5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* misc.h
* (c) 2019, Jonas Gunz, jonasgunz.de
* <Description>
* <License>
*/
#pragma once
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
/*
* Try writing to _fd for _retry times. Retries are reset after every succesful write.
*/
int try_write(int _fd, char *_buff, int _size, int _retry);
/*
* Fork, exec(argc, argv) with new STDIO, return PID
*/
pid_t fork_run(int _stdin, int _stdout, int _stderr, int argc, char* argv[]);
|