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

log take notification-fd by default

parent a618adff
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,8 @@
#define SS_SCANDIR_LEN (sizeof SS_SCANDIR - 1)
#define SS_TREE "tree"
#define SS_TREE_LEN (sizeof SS_TREE - 1)
#define SS_NOTIFICATION "notification-fd"
#define SS_NOTIFICATION_LEN (sizeof SS_NOTIFICATION - 1)
/**tree dir*/
#define SS_RULES "/rules"
#define SS_RULES_LEN (sizeof SS_RULES - 1)
......@@ -56,6 +58,7 @@
#define SS_LOG_SUFFIX_LEN (sizeof SS_LOG_SUFFIX - 1)
#define SS_SVSCAN_LOG "/.s6-svscan"
#define SS_SVSCAN_LOG_LEN (sizeof SS_SVSCAN_LOG - 1)
/** pipe */
#define SS_PIPE_NAME "bundle-"
#define SS_PIPE_NAME_LEN (sizeof SS_PIPE_NAME - 1)
......
......@@ -469,7 +469,7 @@ int write_logger(sv_alltype *sv, sv_execlog *log,char const *name, char const *d
if (!stralloc_cats(&exec,shebang.s)) retstralloc(0,"write_logger") ;
if (!stralloc_cats(&exec,EXECLINE_BINPREFIX "fdmove -c 2 1\n")) retstralloc(0,"write_logger") ;
if (!stralloc_cats(&exec,ui.s)) retstralloc(0,"write_logger") ;
if (!stralloc_cats(&exec,S6_BINPREFIX "s6-log " "n")) retstralloc(0,"write_logger") ;
if (!stralloc_cats(&exec,S6_BINPREFIX "s6-log -d3 " "n")) retstralloc(0,"write_logger") ;
if (!stralloc_cats(&exec,pback)) retstralloc(0,"write_logger") ;
if (!stralloc_cats(&exec," ")) retstralloc(0,"write_logger") ;
if (log->timestamp < NONE)
......@@ -489,7 +489,12 @@ int write_logger(sv_alltype *sv, sv_execlog *log,char const *name, char const *d
VERBO3 strerr_warnwu3sys("write: ",ddst.s,"/run") ;
return 0 ;
}
/** notification fd */
if (!file_write_unsafe(ddst.s,SS_NOTIFICATION,"3\n",2))
{
VERBO3 strerr_warnwu3sys("write: ",ddst.s,"/" SS_NOTIFICATION) ;
return 0 ;
}
if (sv->cname.itype == CLASSIC)
{
ddst.len-- ;
......
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