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

fix container directory deletion

parent 1abc4f73
No related branches found
No related tags found
No related merge requests found
......@@ -41,15 +41,29 @@ int ssexec_scandir_remove(int argc, char const *const *argv, ssexec_t *info)
r = svc_scandir_ok(info->scandir.s) ;
if (r < 0)
log_dieusys(LOG_EXIT_SYS, "check: ", info->scandir.s) ;
if (r)
if (r) {
log_dieu(LOG_EXIT_USER, "remove: ", info->scandir.s, ": is running") ;
/* for now, i have a race condition
unsigned int m = 0 ;
int nargc = 3 ;
char const *newargv[nargc] ;
newargv[m++] = "stop" ;
newargv[m++] = "stop" ;
newargv[m] = 0 ;
if (ssexec_scandir_signal(m, newargv, info))
log_dieu(LOG_EXIT_SYS, "stop scandir: ", info->scandir.s) ;
*/
}
/** /run/66/scandir/0 */
auto_rm(info->scandir.s) ;
/** /run/66/scandir/container */
info->scandir.len = 0 ;
if (!auto_stra(&info->scandir, info->live.s, SS_BOOT_CONTAINER_DIR, "/", info->ownerstr))
if (!auto_stra(&info->scandir, info->live.s, SS_SCANDIR, "/", SS_BOOT_CONTAINER_DIR))
log_die_nomem("stralloc") ;
auto_rm(info->scandir.s) ;
......
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