Radix cross Linux package tools

Package Tools – is a set of utilities to create, install, and update RcL packages

3 Commits   0 Branches   2 Tags
author: kx <kx@radix.pro> 2023-04-11 01:18:34 +0300 committer: kx <kx@radix.pro> 2023-04-11 01:18:34 +0300 commit: 11c606a6888dc269ef018359469a7276c3ad8f67 parent: 8c55752ed5b29a22fdab9faaa6ff27b7cafa6791
Commit Summary:
Version 0.2.1
Diffstat:
1 file changed, 33 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
new file mode 100644
index 0000000..8da6590
--- /dev/null
+++ b/src/system.h
@@ -0,0 +1,49 @@
+
+/**********************************************************************
+
+  Copyright 2019 Andrey V.Kosteltsev
+
+  Licensed under the Radix.pro License, Version 1.0 (the "License");
+  you may not use this file  except  in compliance with the License.
+  You may obtain a copy of the License at
+
+     https://radix.pro/licenses/LICENSE-1.0-en_US.txt
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+  implied.
+
+ **********************************************************************/
+
+#ifndef _SYSTEM_H_
+#define _SYSTEM_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern pid_t sys_exec_command( const char *cmd );
+
+/*****************************************************************
+  sys_wait_command() - Wait for pid.
+
+  Return values:
+  -------------
+     0  - SUCCESS
+   >=1  - status returned by child process
+    -1  - Child terminated on signal
+    -2  - Child terminated on unknown reason
+    -3  - Cannot waitpid: waitpid() retusrs -1
+
+     Error message with SIZE length saved into *ERRMSG buffer.
+ *****************************************************************/
+extern int sys_wait_command( pid_t pid, char *errmsg, size_t size );
+
+
+#ifdef __cplusplus
+}  /* ... extern "C" */
+#endif
+
+#endif /* _SYSTEM_H_ */