extern inline int get_gid(const char *restrict gidstr, gid_t *restrict gid);
+extern inline int get_pid(const char *restrict pidstr, pid_t *restrict pid);
ATTR_STRING(1) ATTR_ACCESS(write_only, 2)
inline int get_gid(const char *restrict gidstr, gid_t *restrict gid);
+ATTR_STRING(1) ATTR_ACCESS(write_only, 2)
+inline int get_pid(const char *restrict pidstr, pid_t *restrict pid);
inline int
}
+inline int
+get_pid(const char *restrict pidstr, pid_t *restrict pid)
+{
+ return a2i(pid_t, pid, pidstr, NULL, 10, 1, type_max(pid_t));
+}
+
+
#endif // include guard
#include <signal.h>
#include "alloc.h"
+#include "atoi/getnum.h"
#include "memzero.h"
#include "nscd.h"
#include "sssd.h"
#include <sys/stat.h>
#include <fcntl.h>
-#include "atoi/a2i.h"
+#include "atoi/getnum.h"
#include "string/sprintf.h"
-int
-get_pid(const char *pidstr, pid_t *pid)
-{
- return a2i(pid_t, pid, pidstr, NULL, 10, 1, type_max(pid_t));
-}
-
/*
* If use passed in fd:4 as an argument, then return the
* value '4', the fd to use.
extern /*@only@*//*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname);
/* get_pid.c */
-extern int get_pid (const char *pidstr, pid_t *pid);
extern int get_pidfd_from_fd(const char *pidfdstr);
extern int open_pidfd(const char *pidstr);
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
+
+#include "atoi/getnum.h"
#include "defines.h"
#include "prototypes.h"
#ifdef ENABLE_SUBIDS