From IRC discussion, people liked this name more.
https://bugzilla.gnome.org/show_bug.cgi?id=649322
<TITLE>UNIX-specific utilities and integration</TITLE>
<FILE>gunix</FILE>
G_UNIX_ERROR
-g_unix_pipe_flags
+g_unix_open_pipe
g_unix_signal_source_new
g_unix_signal_add_watch_full
GCancellablePrivate *priv;
priv = cancellable->priv;
- if (g_unix_pipe_flags (priv->cancel_pipe, FD_CLOEXEC, NULL))
+ if (g_unix_open_pipe (priv->cancel_pipe, FD_CLOEXEC, NULL))
{
/* Make them nonblocking, just to be sure we don't block
* on errors and stuff
}
/**
- * g_unix_pipe_flags:
+ * g_unix_open_pipe:
* @fds: Array of two integers
* @flags: Bitfield of file descriptor flags, see "man 2 fcntl"
* @error: a #GError
* Since: 2.30
*/
gboolean
-g_unix_pipe_flags (int *fds,
- int flags,
- GError **error)
+g_unix_open_pipe (int *fds,
+ int flags,
+ GError **error)
{
int ecode;
GQuark g_unix_error_quark (void);
-gboolean g_unix_pipe_flags (gint *fds,
- gint flags,
- GError **error);
+gboolean g_unix_open_pipe (gint *fds,
+ gint flags,
+ GError **error);
gboolean g_unix_set_fd_nonblocking (gint fd,
gboolean nonblock,
#if IN_HEADER(__G_UNIX_H__)
#if IN_FILE(__G_UNIX_C__)
#ifdef G_OS_UNIX
-g_unix_pipe_flags
g_unix_error_quark
+g_unix_open_pipe
g_unix_set_fd_nonblocking
g_unix_signal_source_new
g_unix_signal_add_watch_full
if (context->wake_up_pipe[0] != -1)
return;
- if (!g_unix_pipe_flags (context->wake_up_pipe, FD_CLOEXEC, &error))
+ if (!g_unix_open_pipe (context->wake_up_pipe, FD_CLOEXEC, &error))
g_error ("Cannot create pipe main loop wake-up: %s", error->message);
context->wake_up_rec.fd = context->wake_up_pipe[0];
if (unix_signal_init_state == UNIX_SIGNAL_INITIALIZED_THREADED)
return;
- if (!g_unix_pipe_flags (unix_signal_wake_up_pipe, FD_CLOEXEC, &error))
+ if (!g_unix_open_pipe (unix_signal_wake_up_pipe, FD_CLOEXEC, &error))
g_error ("Cannot create UNIX signal wake up pipe: %s\n", error->message);
g_unix_set_fd_nonblocking (unix_signal_wake_up_pipe[1], TRUE, NULL);
char buf[1024];
ssize_t bytes_read;
- g_unix_pipe_flags (pipefd, FD_CLOEXEC, NULL);
+ g_unix_open_pipe (pipefd, FD_CLOEXEC, NULL);
g_assert_no_error (error);
write (pipefd[1], "hello", sizeof ("hello"));