2 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #include <sys/types.h>
23 #include "launchpad_sigchld.h"
24 #include "launchpad_socket.h"
25 #include "log_private.h"
27 #define HYDRA_SIGCHLD_SOCK ".hydra-sigchld-sock"
29 int _sigchld_send(int pid)
32 char path[LAUNCHPAD_SOCKET_PATH_SIZE];
36 _E("Invalid parameter");
40 snprintf(path, sizeof(path), "/run/aul/daemons/%u/%s",
41 getuid(), HYDRA_SIGCHLD_SOCK);
42 ret = _socket_create(path, true, &sock);
46 ret = _socket_send(sock, &pid, sizeof(pid));
47 _socket_destroy(sock);