Commit cd86460c authored by Marcus Nordenberg's avatar Marcus Nordenberg

add rt_ini daemonize ability

parent d9a86e95
...@@ -9,4 +9,5 @@ ...@@ -9,4 +9,5 @@
rls/ rls/
adm/ adm/
pwre_db pwre_db
.vscode/
This diff is collapsed.
/* /*
* ProviewR Open Source Process Control. * ProviewR Open Source Process Control.
* Copyright (C) 2005-2018 SSAB EMEA AB. * Copyright (C) 2005-2018 SSAB EMEA AB.
* *
* This file is part of ProviewR. * This file is part of ProviewR.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of * published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful * This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/> * along with ProviewR. If not, see <http://www.gnu.org/licenses/>
* *
* Linking ProviewR statically or dynamically with other modules is * Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and * making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole * conditions of the GNU General Public License cover the whole
* combination. * combination.
* *
* In addition, as a special exception, the copyright holders of * In addition, as a special exception, the copyright holders of
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
* ProviewR Configurator, combine ProviewR with modules generated by the * ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license * ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting * terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every * combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of * copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the * the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU * combined work), being distributed under the terms of the GNU
* General Public License plus this exception. * General Public License plus this exception.
*/ */
...@@ -57,7 +57,8 @@ typedef union { ...@@ -57,7 +57,8 @@ typedef union {
pwr_Bits( verbose , 1), pwr_Bits( verbose , 1),
pwr_Bits( restart , 1), pwr_Bits( restart , 1),
pwr_Bits( stop , 1), pwr_Bits( stop , 1),
pwr_Bits( fill_0 , 2),,, pwr_Bits( daemonize , 1),
pwr_Bits( fill_0 , 1),,
pwr_Bits( interactive , 1), pwr_Bits( interactive , 1),
pwr_Bits( busid , 1), pwr_Bits( busid , 1),
...@@ -82,6 +83,7 @@ typedef union { ...@@ -82,6 +83,7 @@ typedef union {
#define ini_mContext_verbose pwr_Bit(3) #define ini_mContext_verbose pwr_Bit(3)
#define ini_mContext_restart pwr_Bit(4) #define ini_mContext_restart pwr_Bit(4)
#define ini_mContext_stop pwr_Bit(5) #define ini_mContext_stop pwr_Bit(5)
#define ini_mContext_daemonize pwr_Bit(6)
#define ini_mContext_interactive pwr_Bit(8) #define ini_mContext_interactive pwr_Bit(8)
#define ini_mContext_busid pwr_Bit(9) #define ini_mContext_busid pwr_Bit(9)
...@@ -97,7 +99,7 @@ typedef union { ...@@ -97,7 +99,7 @@ typedef union {
#define ini_mContext_ (~ini_mContext__) #define ini_mContext_ (~ini_mContext__)
} ini_mContext; } ini_mContext;
typedef union { typedef union {
pwr_tBitMask m; pwr_tBitMask m;
pwr_32Bits ( pwr_32Bits (
...@@ -130,7 +132,7 @@ typedef union { ...@@ -130,7 +132,7 @@ typedef union {
#define ini_mProc_ (~ini_mProc__) #define ini_mProc_ (~ini_mProc__)
} ini_mProc; } ini_mProc;
typedef struct { typedef struct {
char name[256]; char name[256];
int *errcount; int *errcount;
...@@ -199,14 +201,14 @@ pwr_tBoolean ini_CreateDb (pwr_tStatus*, ini_sContext*); ...@@ -199,14 +201,14 @@ pwr_tBoolean ini_CreateDb (pwr_tStatus*, ini_sContext*);
pwr_tBoolean ini_DecodeBodies (pwr_tStatus*, ini_sContext*, pwr_tBoolean); pwr_tBoolean ini_DecodeBodies (pwr_tStatus*, ini_sContext*, pwr_tBoolean);
pwr_tBoolean ini_FreeBodies (pwr_tStatus*, ini_sContext*, pwr_tBoolean); pwr_tBoolean ini_FreeBodies (pwr_tStatus*, ini_sContext*, pwr_tBoolean);
pwr_tBoolean ini_IterVolumes (pwr_tStatus*, ini_sContext*, pwr_tBoolean ini_IterVolumes (pwr_tStatus*, ini_sContext*,
pwr_tBoolean (*func)(pwr_tStatus*, ini_sContext*, ivol_sVolume*)); pwr_tBoolean (*func)(pwr_tStatus*, ini_sContext*, ivol_sVolume*));
char * ini_LoadDirectory (pwr_tStatus*, ini_sContext*); char * ini_LoadDirectory (pwr_tStatus*, ini_sContext*);
pwr_tBoolean ini_LoadNode (pwr_tStatus*, ini_sContext*); pwr_tBoolean ini_LoadNode (pwr_tStatus*, ini_sContext*);
pwr_tBoolean ini_LoadVolume (pwr_tStatus*, ini_sContext*, ivol_sVolume*); pwr_tBoolean ini_LoadVolume (pwr_tStatus*, ini_sContext*, ivol_sVolume*);
FILE *ini_OpenFile (pwr_tStatus*, ini_sContext*, ini_sFile*); FILE *ini_OpenFile (pwr_tStatus*, ini_sContext*, ini_sFile*);
ini_sProc *ini_ProcInsert (pwr_tStatus*, ini_sContext*, char*, char*, int, int, char*, int, int, pwr_tCid, char*, void*); ini_sProc *ini_ProcInsert (pwr_tStatus*, ini_sContext*, char*, char*, int, int, char*, int, int, pwr_tCid, char*, void*);
void ini_ProcIter (pwr_tStatus*, ini_sContext*, int, int, void ini_ProcIter (pwr_tStatus*, ini_sContext*, int, int,
void (*func) (pwr_tStatus*, ini_sContext*, ini_sProc*)); void (*func) (pwr_tStatus*, ini_sContext*, ini_sProc*));
void ini_ProcLoad (pwr_tStatus*, ini_sContext*, ini_sProc*); void ini_ProcLoad (pwr_tStatus*, ini_sContext*, ini_sProc*);
void ini_ProcStart (pwr_tStatus*, ini_sContext*, ini_sProc*); void ini_ProcStart (pwr_tStatus*, ini_sContext*, ini_sProc*);
void ini_ProcPrio (pwr_tStatus*, ini_sContext*, ini_sProc*); void ini_ProcPrio (pwr_tStatus*, ini_sContext*, ini_sProc*);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment