Rename g_unix_pipe_flags to g_unix_open_pipe

From IRC discussion, people liked this name more.

https://bugzilla.gnome.org/show_bug.cgi?id=649322
This commit is contained in:
Colin Walters 2011-05-03 16:31:34 -04:00 committed by Matthias Clasen
parent ba5c9bd39f
commit 542215b78a
7 changed files with 13 additions and 13 deletions

View File

@ -1928,7 +1928,7 @@ g_win32_ftruncate
<TITLE>UNIX-specific utilities and integration</TITLE> <TITLE>UNIX-specific utilities and integration</TITLE>
<FILE>gunix</FILE> <FILE>gunix</FILE>
G_UNIX_ERROR G_UNIX_ERROR
g_unix_pipe_flags g_unix_open_pipe
g_unix_signal_source_new g_unix_signal_source_new
g_unix_signal_add_watch_full g_unix_signal_add_watch_full

View File

@ -199,7 +199,7 @@ g_cancellable_open_pipe (GCancellable *cancellable)
GCancellablePrivate *priv; GCancellablePrivate *priv;
priv = cancellable->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 /* Make them nonblocking, just to be sure we don't block
* on errors and stuff * on errors and stuff

View File

@ -74,7 +74,7 @@ g_unix_set_error_from_errno_saved (GError **error,
} }
/** /**
* g_unix_pipe_flags: * g_unix_open_pipe:
* @fds: Array of two integers * @fds: Array of two integers
* @flags: Bitfield of file descriptor flags, see "man 2 fcntl" * @flags: Bitfield of file descriptor flags, see "man 2 fcntl"
* @error: a #GError * @error: a #GError
@ -93,9 +93,9 @@ g_unix_set_error_from_errno_saved (GError **error,
* Since: 2.30 * Since: 2.30
*/ */
gboolean gboolean
g_unix_pipe_flags (int *fds, g_unix_open_pipe (int *fds,
int flags, int flags,
GError **error) GError **error)
{ {
int ecode; int ecode;

View File

@ -57,9 +57,9 @@
GQuark g_unix_error_quark (void); GQuark g_unix_error_quark (void);
gboolean g_unix_pipe_flags (gint *fds, gboolean g_unix_open_pipe (gint *fds,
gint flags, gint flags,
GError **error); GError **error);
gboolean g_unix_set_fd_nonblocking (gint fd, gboolean g_unix_set_fd_nonblocking (gint fd,
gboolean nonblock, gboolean nonblock,

View File

@ -1981,8 +1981,8 @@ g_hostname_to_unicode
#if IN_HEADER(__G_UNIX_H__) #if IN_HEADER(__G_UNIX_H__)
#if IN_FILE(__G_UNIX_C__) #if IN_FILE(__G_UNIX_C__)
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
g_unix_pipe_flags
g_unix_error_quark g_unix_error_quark
g_unix_open_pipe
g_unix_set_fd_nonblocking g_unix_set_fd_nonblocking
g_unix_signal_source_new g_unix_signal_source_new
g_unix_signal_add_watch_full g_unix_signal_add_watch_full

View File

@ -560,7 +560,7 @@ g_main_context_init_pipe (GMainContext *context)
if (context->wake_up_pipe[0] != -1) if (context->wake_up_pipe[0] != -1)
return; 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); g_error ("Cannot create pipe main loop wake-up: %s", error->message);
context->wake_up_rec.fd = context->wake_up_pipe[0]; context->wake_up_rec.fd = context->wake_up_pipe[0];
@ -4636,7 +4636,7 @@ init_unix_signal_wakeup_state_unlocked (void)
if (unix_signal_init_state == UNIX_SIGNAL_INITIALIZED_THREADED) if (unix_signal_init_state == UNIX_SIGNAL_INITIALIZED_THREADED)
return; 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_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); g_unix_set_fd_nonblocking (unix_signal_wake_up_pipe[1], TRUE, NULL);

View File

@ -34,7 +34,7 @@ test_pipe (void)
char buf[1024]; char buf[1024];
ssize_t bytes_read; 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); g_assert_no_error (error);
write (pipefd[1], "hello", sizeof ("hello")); write (pipefd[1], "hello", sizeof ("hello"));