MCPcopy Create free account
hub / github.com/corosync/corosync / killnode_do

Function killnode_do

tools/corosync-cfgtool.c:503–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501
502
503static void killnode_do(unsigned int nodeid)
504{
505 cs_error_t result;
506 corosync_cfg_handle_t handle;
507
508 printf ("Killing node " CS_PRI_NODE_ID "\n", nodeid);
509 result = corosync_cfg_initialize (&handle, NULL);
510 if (result != CS_OK) {
511 fprintf (stderr, "Could not initialize corosync configuration API error %d\n", result);
512 exit (EXIT_FAILURE);
513 }
514 result = corosync_cfg_kill_node (handle, nodeid, "Killed by corosync-cfgtool");
515 if (result != CS_OK) {
516 fprintf (stderr, "Could not kill node (error = %s)\n", cs_strerror(result));
517 exit(EXIT_FAILURE);
518 }
519 (void)corosync_cfg_finalize (handle);
520}
521
522
523static void usage_do (void)

Callers 1

mainFunction · 0.85

Calls 4

corosync_cfg_initializeFunction · 0.85
corosync_cfg_kill_nodeFunction · 0.85
cs_strerrorFunction · 0.85
corosync_cfg_finalizeFunction · 0.85

Tested by

no test coverage detected