Skip to content
Snippets Groups Projects
Commit 101d080e authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

use environ instead of envp

parent c9cca400
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
/** 1-> backup
* 0-> ori */
int db_switch_to(ssexec_t *info, char const *const *envp,unsigned int where)
int db_switch_to(ssexec_t *info, unsigned int where)
{
log_flow() ;
......@@ -80,7 +80,7 @@ int db_switch_to(ssexec_t *info, char const *const *envp,unsigned int where)
goto err ;
}
log_trace("update ",info->livetree.s,"/",info->treename.s," to ",db.s,"/",info->treename.s) ;
if (!db_update(db.s, info,envp))
if (!db_update(db.s, info))
{
log_trace("rollback db service: ", info->treename.s) ;
memcpy(cmd + cmdlen," -s0",4) ;
......@@ -114,7 +114,7 @@ int db_switch_to(ssexec_t *info, char const *const *envp,unsigned int where)
goto err ;
}
log_trace("update ",info->livetree.s,"/",info->treename.s," to ",db.s,"/",info->treename.s) ;
if (!db_update(db.s, info,envp))
if (!db_update(db.s, info))
{
log_trace("rollback db: ", info->treename.s) ;
memcpy(cmd + cmdlen," -s1",4) ;
......
......@@ -28,7 +28,7 @@
#include <66/utils.h>
#include <66/ssexec.h>
int db_update(char const *newdb, ssexec_t *info,char const *const *envp)
int db_update(char const *newdb, ssexec_t *info)
{
log_flow() ;
......@@ -56,7 +56,7 @@ int db_update(char const *newdb, ssexec_t *info,char const *const *envp)
newargv[m++] = db ;
newargv[m++] = 0 ;
pid = child_spawn0(newargv[0],newargv,envp) ;
pid = child_spawn0(newargv[0],newargv, (char const *const *)environ) ;
if (waitpid_nointr(pid,&wstat, 0) < 0)
log_warnusys_return(LOG_EXIT_ZERO,"wait for ",newargv[0]) ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment