Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix amqpspawn #7

Merged
merged 2 commits into from
Sep 13, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion amqpspawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ int main(int argc, char **argv) {
char const *username = "guest";
char const *password = "guest";
char const *program = NULL;
char const *program_args = NULL;
char const *program_args = "";
amqp_bytes_t queue = AMQP_EMPTY_BYTES;

int sockfd;
Expand Down Expand Up @@ -321,6 +321,7 @@ int main(int argc, char **argv) {
conn = amqp_new_connection();

die_on_error(sockfd = amqp_open_socket(hostname, port), "Opening socket");
fcntl(sockfd, F_SETFD, FD_CLOEXEC);
amqp_set_sockfd(conn, sockfd);
die_on_amqp_error(amqp_login(conn, vhost,
0, /* channel_max */
Expand Down