From 5f0b87d570432d5d3cccebb677eaffeef3f78d86 Mon Sep 17 00:00:00 2001
From: Tim Wickberg <tim@schedmd.com>
Date: Mon, 13 Jun 2016 05:25:07 -0400
Subject: [PATCH] Reset RELEASE_NOTES for 17.02.

---
 RELEASE_NOTES                                 | 173 +-----------------
 src/api/reconfigure.c                         |   2 +-
 src/common/forward.c                          |   2 +-
 src/common/slurm_protocol_api.c               |  71 ++++---
 src/common/slurm_protocol_api.h               |  42 ++---
 src/common/slurm_protocol_defs.h              |   2 +-
 src/common/slurm_protocol_interface.h         |  40 ++--
 src/common/slurm_protocol_socket_common.h     |   5 -
 .../slurm_protocol_socket_implementation.c    |  35 ++--
 src/common/slurmdbd_defs.c                    |  10 +-
 .../accounting_storage/common/common_as.c     |   2 +-
 src/plugins/launch/aprun/launch_aprun.c       |   2 +-
 src/plugins/launch/runjob/launch_runjob.c     |   2 +-
 src/plugins/sched/wiki/msg.c                  |  18 +-
 src/plugins/sched/wiki2/event.c               |   2 +-
 src/plugins/sched/wiki2/msg.c                 |  18 +-
 src/plugins/slurmctld/dynalloc/msg.c          |  16 +-
 src/plugins/slurmctld/nonstop/msg.c           |   8 +-
 src/plugins/switch/nrt/libpermapi/shr_64.c    |  14 +-
 src/slurmctld/backup.c                        |   4 +-
 src/slurmctld/controller.c                    |   6 +-
 src/slurmctld/job_mgr.c                       |  16 +-
 src/slurmctld/slurmctld.h                     |  28 +--
 src/slurmctld/step_mgr.c                      |   6 +-
 src/slurmd/slurmd/slurmd.c                    |  13 +-
 src/slurmd/slurmd/slurmd.h                    |   2 +-
 src/slurmd/slurmstepd/io.c                    |   4 +-
 src/slurmdbd/backup.c                         |   2 +-
 src/slurmdbd/proc_req.c                       |   2 +-
 src/slurmdbd/proc_req.h                       |   2 +-
 src/slurmdbd/rpc_mgr.c                        |  12 +-
 src/slurmdbd/rpc_mgr.h                        |   2 +-
 src/slurmdbd/slurmdbd.c                       |   2 +-
 src/srun/libsrun/allocate.c                   |   8 +-
 src/srun/libsrun/allocate.h                   |   2 +-
 src/srun/libsrun/srun_job.h                   |   2 +-
 36 files changed, 203 insertions(+), 374 deletions(-)

diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index de0a057d977..64d9699386e 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,5 +1,5 @@
-RELEASE NOTES FOR SLURM VERSION 16.05
-27 April 2016
+RELEASE NOTES FOR SLURM VERSION 17.02
+13 July 2016
 
 IMPORTANT NOTES:
 ANY JOBS WITH A JOB ID ABOVE 2,147,463,647 WILL BE PURGED WHEN SLURM IS
@@ -7,7 +7,7 @@ UPGRADED FROM AN OLDER VERSION! Reduce your configured MaxJobID value as needed
 prior to upgrading in order to eliminate these jobs.
 
 If using the slurmdbd (Slurm DataBase Daemon) you must update this first.
-The 16.05 slurmdbd will work with Slurm daemons of version 14.11 and above.
+The 17.02 slurmdbd will work with Slurm daemons of version 15.08 and above.
 You will not need to update all clusters at the same time, but it is very
 important to update slurmdbd first and having it running before updating
 any other clusters making use of it.  No real harm will come from updating
@@ -22,7 +22,7 @@ under the [mysqld] reference in the my.cnf file and restarting the mysqld. The
 buffer pool size must be smaller than the size of the MySQL tmpdir. This is
 needed when converting large tables over to the new database schema.
 
-Slurm can be upgraded from version 14.03 or 14.11 to version 15.08 without loss
+Slurm can be upgraded from version 15.08 or 16.05 to version 17.02 without loss
 of jobs or other state information. Upgrading directly from an earlier version
 of Slurm will result in loss of state information.
 
@@ -32,204 +32,39 @@ upgrading Slurm to a new major release.
 
 HIGHLIGHTS
 ==========
- -- Implemented and documented PMIX protocol which is used to bootstrap an
-    MPI job. PMIX is an alternative to PMI and PMI2.
- -- Change default CgroupMountpoint (in cgroup.conf) from "/cgroup" to
-    "/sys/fs/cgroup" to match current standard.
- -- Add Multi-Category Security (MCS) infrastructure to permit nodes to be bound
-    to specific users or groups.
- -- Added --deadline option to salloc, sbatch and srun. Jobs which can not be
-    completed by the user specified deadline will be terminated with a state of
-    "Deadline" or "DL".
- -- Add an "scontrol top <jobid>" command to re-order the priorities of a user's
-    pending jobs. May be disabled with the "disable_user_top" option in the
-    SchedulerParameters configuration parameter.
- -- Added new job dependency type of "aftercorr" which will start a task of a
-    job array after the corresponding task of another job array completes.
- -- Add --gres-flags=enforce-binding option to salloc, sbatch and srun commands.
-    If set, the only CPUs available to the job will be those bound to the
-    selected GRES (i.e. the CPUs identifed in the gres.conf file will be
-    strictly enforced rather than advisory).
- -- Added wrappers for LSF/OpenLava commands
- -- Added Grid Engine options to qsub command wrapper.
 
 RPMBUILD CHANGES
 ================
- -- Remove all *.la files from RPMs.
- -- Implemented the --without=package option for configure.
 
 CONFIGURATION FILE CHANGES (see man appropriate man page for details)
 =====================================================================
- -- New configuration parameter NodeFeaturesPlugins added.
- -- Change default CgroupMountpoint (in cgroup.conf) from "/cgroup" to
-    "/sys/fs/cgroup" to match current standard.
- -- Introduce a new parameter "requeue_setup_env_fail" in SchedulerParameters.
-    If set, a job that fails to setup the environment will be requeued and the
-    node drained.
- -- The partition-specific SelectTypeParameters parameter can now be used to
-    change the memory allocation tracking specification in the global
-    SelectTypeParameters configuration parameter. Supported partition-specific
-    values are CR_Core, CR_Core_Memory, CR_Socket and CR_Socket_Memory. If the
-    global SelectTypeParameters value includes memory allocation management and
-    the partition-specific value does not, then memory allocation management for
-    that partition will NOT be supported (i.e. memory can be over-allocated).
-    Likewise the global SelectTypeParameters might not include memory management
-    while the partition-specific value does.
- -- Split partition's "Priority" field into "PriorityTier" (used to order
-    partitions for scheduling and preemption) plus "PriorityJobFactor" (used by
-    priority/multifactor plugin in calculating job priority, which is used to
-    order jobs within a partition for scheduling). If only "Priority" is
-    specified, that value will be used for both the "PriorityTier" and
-    "PriorityJobFactor" value.
- -- New configuration file "knl.conf" added specifically for Intel Knights
-    Landing processor support.
- -- Make it so jobs/steps track ':' named gres/tres, before hand gres/gpu:tesla
-    would only track gres/gpu, now it will track both gres/gpu and
-    gres/gpu:tesla as separate gres if configured like
-    AccountingStorageTRES=gres/gpu,gres/gpu:tesla
- -- Add TCPTimeout option to slurm[dbd].conf. Decouples MessageTimeout from TCP
-    connections.
- -- Added SchedulingParameters option of "bf_min_prio_reserve". Jobs below
-    the specified threshold will not have resources reserved for them.
- -- Add SchedulerParameter "no_env_cache", if set no environment cache will be
-    used when launching a job, instead the job will fail and drain the node if
-    the environment isn't loaded normally.
- -- Remove the SchedulerParameters option of "assoc_limit_continue", making it
-    the default value. Add option of "assoc_limit_stop". If "assoc_limit_stop"
-    is set and a job cannot start due to association limits, then do not attempt
-    to initiate any lower priority jobs in that partition. Setting this can
-    decrease system throughput and utlization, but avoid potentially starving
-    larger jobs by preventing them from launching indefinitely.
- -- Rename partition configuration from "Shared" to "OverSubscribe". Rename
-    salloc, sbatch, srun option from "--shared" to "--oversubscribe". The old
-    options will continue to function. Output field names also changed in
-    scontrol, sinfo, squeue and sview.
- -- Add TopologyParam option of "TopoOptional" to optimize network topology
-    only for jobs requesting it.
- -- Configuration parameter "CpuFreqDef" used to set default governor for job
-    step not specifying --cpu-freq (previously the parameter was unused)
- -- Use TaskPluginParam for default task binding if no user specified CPU
-    binding. User --cpu_bind option takes precident over default. No longer
-    any error if user --cpu_bind option does not match TaskPluginParam.
 
 COMMAND CHANGES (see man pages for details)
 ===========================================
- -- sbatch to read OpenLava/LSF/#BSUB options from the batch script.
- -- Add sbatch "--wait" option that waits for job completion before exiting.
-    Exit code will match that of spawned job.
- -- Job output and error files can now contain "%" character by specifying
-    a file name with two consecutive "%" characters. For example,
-    "sbatch -o "slurm.%%.%j" for job ID 123 will generate an output file named
-    "slurm.%.123".
- -- Increase default sbcast buffer size from 512KB to 8MB.
- -- Add "ValidateTimeout" and "OtherTimeout" to "scontrol show burst" output.
- -- Implemented the checking configuration functionality using the new -C
-    options of slurmctld. To check for configuration errors in slurm.conf
-    run: 'slurmctld -C'.
- -- Burst buffer advanced reservation units treated as bytes (per documentation)
-    rather than GB.
- -- Add "features_act" field (currently active features) to the node
-    information. Output of scontrol, sinfo, and sview changed accordingly.
-    The field previously displayed as "Features" is now "AvailableFeatures"
-    while the new field is displayed as "ActiveFeatures".
- -- Enable sbcast data compression logic (compress option previously ignored).
- -- Add --compress option to srun command for use with --bcast option.
- -- Added "sacctmgr show lostjobs" to report any orphaned jobs in the database.
- -- Add reservation flag of "purge_comp" which will purge an advanced
-    reservation once it has no more active (pending, suspended or running) jobs.
- -- Add ARRAY_TASKS mail option to send emails to each task in a job array.
 
 OTHER CHANGES
 =============
- -- Add mail wrapper script "smail" that will include job statistics in email
-    notification messages.
- -- Removed support for authd. authd has not been developed and supported since
-    several years.
- -- Enable the hdf5 profiling of the batch step.
- -- Eliminate redundant environment and script files for job arrays. This
-    greatly reduces the number of files involved in managing job arrays.
- -- Burst buffer/cray - Add support for multiple buffer pools including support
-    for different resource granularity by pool.
- -- Stop searching sbatch scripts for #PBS directives after 100 lines of
-    non-comments. Stop parsing #PBS or #SLURM directives after 1024 characters
-    into a line. Required for decent perforamnce with huge scripts.
- -- New node features plugin infrastructure added. Currently used for support
-    of Intel Knights Landing processor.
- -- If NodeHealthCheckProgram configured HealthCheckInterval is non-zero, then
-    modify slurmd to run it before registering with slurmctld.
- -- select/cray - Initiate step node health check at start of step termination
-    rather than after application completely ends so that NHC can capture
-    information about hung (non-killable) processes.
- -- Display thread name along with thread id and remove process name in stderr
-    logging for "thread_id" LogTimeFormat.
 
 API CHANGES
 ===========
-Removed PARAMS macro from slurm.h.
-Removed BEGIN_C_DECLS and END_C_DECLS macros from slurm.h.
 
 Changed members of the following structs
 ========================================
-In burst_buffer_info_t, Changed gres_cnt to pool_cnt
-	Changed gres_ptr to pool_ptr
-In burst_buffer_pool_t: Changed avail_cnt to total_space
-In job_desc_msg_t: Changed nice from 16 to 32-bits
-In partition_info_t: Split priority into priority_job_factor and priority_tier
-In slurm_job_info_t: Changed nice from 16 to 32-bits
 
 Added members to the following struct definitions
 =================================================
-In burst_buffer_info_t: Added other_timeout and validate_timeout
-In burst_buffer_resv_t: Added pool
-In job_desc_msg_t: Added deadline, mcs_label
-In node_info_t: Added features_act and mcs_label
-In resource_allocation_response_msg_t: Added ntasks_per_board, ntasks_per_core,
-	ntasks_per_socket
-In slurm_job_info_t: Added deadline, num_tasks, mcs_label
-In slurm_ctl_conf_t: Added mcs_plugin, mcs_plugin_params, tcp_timeout, and
-	node_features_plugins
-In slurm_step_launch_params_t: Added ntasks_per_board, ntasks_per_core,
-	ntasks_per_socket
-In update_node_msg_t: Added features_act
-In slurm_job_info_t: Added start_protocol_ver
-In slurm_step_layout_t: Added start_protocol_ver
-In job_step_info_t: Added start_protocol_ver
 
 Added the following struct definitions
 ======================================
-Added top_job_msg_t for user to reorder his jobs
 
 Removed members from the following struct definitions
 =====================================================
-In burst_buffer_resv_t: Removed gres_cnt and gres_ptr
 
 Changed the following enums and #defines
 ========================================
-Added DEBUG_FLAG_TIME_CRAY and DEBUG_FLAG_NODE_FEATURES
-Added RESERVE_FLAG_PURGE_COMP
-Added JOB_DEADLINE (job state)
-Added MAIL_ARRAY_TASK (mail flag)
-Changed MAX_TASKS_PER_NODE from 128 to 512
-Changed NICE_OFFSET from 10000 to 0x80000000
-Added new job state/wait reasons: FAIL_DEADLINE, WAIT_QOS_MAX_BB_PER_ACCT,
-	WAIT_QOS_MAX_CPU_PER_ACCT, WAIT_QOS_MAX_ENERGY_PER_ACCT,
-	WAIT_QOS_MAX_GRES_PER_ACCT, WAIT_QOS_MAX_NODE_PER_ACCT,
-	WAIT_QOS_MAX_LIC_PER_ACCT, WAIT_QOS_MAX_MEM_PER_ACCT,
-	WAIT_QOS_MAX_UNK_PER_ACCT, WAIT_QOS_MAX_JOB_PER_ACCT,
-	WAIT_QOS_MAX_SUB_JOB_PER_ACCT
-Added new partition limit enforcement flags: PARTITION_ENFORCE_NONE,
-	PARTITION_ENFORCE_ALL, PARTITION_ENFORCE_ANY
-Added select plugin IDs: SELECT_PLUGIN_BLUEGENE, SELECT_PLUGIN_CONS_RES,
-	SELECT_PLUGIN_LINEAR, SELECT_PLUGIN_ALPS, SELECT_PLUGIN_SERIAL,
-	SELECT_PLUGIN_CRAY_LINEAR, SELECT_PLUGIN_CRAY_CONS_RES
-Added job flags: GRES_ENFORCE_BIND and TEST_NOW_ONLY
-Added job resource sharing flags: JOB_SHARED_NONE, JOB_SHARED_OK,
-	JOB_SHARED_USER, JOB_SHARED_MCS
 
 Added the following API's
 =========================
-Added slurm_top_job() function to reorder a user's jobs
 
 Changed the following API's
 ============================
-Added use_protocol_ver parameter to slurm_job_step_stat().
diff --git a/src/api/reconfigure.c b/src/api/reconfigure.c
index c2e1fd22845..a6842e686a8 100644
--- a/src/api/reconfigure.c
+++ b/src/api/reconfigure.c
@@ -151,7 +151,7 @@ int
 _send_message_controller (enum controller_id dest, slurm_msg_t *req)
 {
 	int rc = SLURM_PROTOCOL_SUCCESS;
-	slurm_fd_t fd = -1;
+	int fd = -1;
 	slurm_msg_t *resp_msg = NULL;
 
 	/* always going to one node (primary or backup per value of "dest") */
diff --git a/src/common/forward.c b/src/common/forward.c
index 118a1f1fbdb..73f7e558d09 100644
--- a/src/common/forward.c
+++ b/src/common/forward.c
@@ -100,7 +100,7 @@ void *_forward_thread(void *arg)
 	forward_struct_t *fwd_struct = fwd_msg->fwd_struct;
 	Buf buffer = init_buf(BUF_SIZE);	/* probably enough for header */
 	List ret_list = NULL;
-	slurm_fd_t fd = -1;
+	int fd = -1;
 	ret_data_info_t *ret_data_info = NULL;
 	char *name = NULL;
 	hostlist_t hl = hostlist_create(fwd_msg->header.forward.nodelist);
diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c
index 96f8fafcec0..6236d13fd5c 100644
--- a/src/common/slurm_protocol_api.c
+++ b/src/common/slurm_protocol_api.c
@@ -2794,11 +2794,11 @@ static void _remap_slurmctld_errno(void)
  *      even if asked for an ephemeral port.
  *
  * IN  port     - port to bind the msg server to
- * RET slurm_fd_t - file descriptor of the connection created
+ * RET int      - file descriptor of the connection created
  */
-slurm_fd_t slurm_init_msg_engine_port(uint16_t port)
+int slurm_init_msg_engine_port(uint16_t port)
 {
-	slurm_fd_t cc;
+	int cc;
 	slurm_addr_t addr;
 	int i;
 
@@ -2818,8 +2818,7 @@ slurm_fd_t slurm_init_msg_engine_port(uint16_t port)
 
 /* slurm_init_msg_engine_ports()
  */
-slurm_fd_t
-slurm_init_msg_engine_ports(uint16_t *ports)
+int slurm_init_msg_engine_ports(uint16_t *ports)
 {
 	int cc;
 	int val;
@@ -2857,9 +2856,9 @@ slurm_init_msg_engine_ports(uint16_t *ports)
  *
  * IN  addr_name - address to bind the msg server to (NULL means any)
  * IN  port      - port to bind the msg server to
- * RET slurm_fd_t  - file descriptor of the connection created
+ * RET int       - file descriptor of the connection created
  */
-slurm_fd_t slurm_init_msg_engine_addrname_port(char *addr_name, uint16_t port)
+int slurm_init_msg_engine_addrname_port(char *addr_name, uint16_t port)
 {
 	slurm_addr_t addr;
 
@@ -2875,7 +2874,7 @@ slurm_fd_t slurm_init_msg_engine_addrname_port(char *addr_name, uint16_t port)
  * IN  fd  - an open file descriptor to close
  * RET int - the return code
  */
-int slurm_shutdown_msg_engine(slurm_fd_t fd)
+int slurm_shutdown_msg_engine(int fd)
 {
 	int rc = slurm_close(fd);
 	if (rc)
@@ -2890,7 +2889,7 @@ int slurm_shutdown_msg_engine(slurm_fd_t fd)
  * IN  fd  - an open file descriptor to close
  * RET int - the return code
  */
-int slurm_shutdown_msg_conn(slurm_fd_t fd)
+int slurm_shutdown_msg_conn(int fd)
 {
 	return slurm_close(fd);
 }
@@ -2907,9 +2906,9 @@ int slurm_shutdown_msg_conn(slurm_fd_t fd)
  * IN slurm_address	- slurm_addr_t of the connection destination
  * RET slurm_fd		- file descriptor of the connection created
  */
-slurm_fd_t slurm_open_msg_conn(slurm_addr_t * slurm_address)
+int slurm_open_msg_conn(slurm_addr_t * slurm_address)
 {
-	slurm_fd_t fd = slurm_open_stream(slurm_address, false);
+	int fd = slurm_open_stream(slurm_address, false);
 	if (fd >= 0)
 		fd_set_close_on_exec(fd);
 	return fd;
@@ -2921,9 +2920,9 @@ slurm_fd_t slurm_open_msg_conn(slurm_addr_t * slurm_address)
  * IN/OUT addr     - address of controller contacted
  * RET slurm_fd	- file descriptor of the connection created
  */
-slurm_fd_t slurm_open_controller_conn(slurm_addr_t *addr, bool *use_backup)
+int slurm_open_controller_conn(slurm_addr_t *addr, bool *use_backup)
 {
-	slurm_fd_t fd = -1;
+	int fd = -1;
 	slurm_ctl_conf_t *conf;
 	slurm_protocol_config_t *myproto = NULL;
 	int retry, max_retry_period;
@@ -3008,13 +3007,13 @@ end_it:
 
 /* calls connect to make a connection-less datagram connection to the
  *	primary or secondary slurmctld message engine
- * RET slurm_fd_t - file descriptor of the connection created
  * IN dest      - controller to contact, primary or secondary
+ * RET int      - file descriptor of the connection created
  */
-slurm_fd_t slurm_open_controller_conn_spec(enum controller_id dest)
+int slurm_open_controller_conn_spec(enum controller_id dest)
 {
 	slurm_addr_t *addr;
-	slurm_fd_t rc;
+	int rc;
 
 	if (slurm_api_set_default_config() < 0) {
 		debug3("Error: Unable to set default config");
@@ -3047,12 +3046,12 @@ slurm_fd_t slurm_open_controller_conn_spec(enum controller_id dest)
 /*
  * NOTE: memory is allocated for the returned msg must be freed at
  *       some point using the slurm_free_functions.
- * IN open_fd	- file descriptor to receive msg on
+ * IN fd	- file descriptor to receive msg on
  * OUT msg	- a slurm_msg struct to be filled in by the function
  * IN timeout	- how long to wait in milliseconds
  * RET int	- returns 0 on success, -1 on failure and sets errno
  */
-int slurm_receive_msg(slurm_fd_t fd, slurm_msg_t *msg, int timeout)
+int slurm_receive_msg(int fd, slurm_msg_t *msg, int timeout)
 {
 	char *buf = NULL;
 	size_t buflen = 0;
@@ -3206,7 +3205,7 @@ total_return:
  *		  forwarded the message to. List containing type
  *		  (ret_data_info_t).
  */
-List slurm_receive_msgs(slurm_fd_t fd, int steps, int timeout)
+List slurm_receive_msgs(int fd, int steps, int timeout)
 {
 	char *buf = NULL;
 	size_t buflen = 0;
@@ -3412,7 +3411,7 @@ static int _unpack_msg_uid(Buf buffer)
  * IN timeout	- how long to wait in milliseconds
  * RET int	- returns 0 on success, -1 on failure and sets errno
  */
-int slurm_receive_msg_and_forward(slurm_fd_t fd, slurm_addr_t *orig_addr,
+int slurm_receive_msg_and_forward(int fd, slurm_addr_t *orig_addr,
 				  slurm_msg_t *msg, int timeout)
 {
 	char *buf = NULL;
@@ -3644,7 +3643,7 @@ _pack_msg(slurm_msg_t *msg, header_t *hdr, Buf buffer)
  *  Send a slurm message over an open file descriptor `fd'
  *    Returns the size of the message sent in bytes, or -1 on failure.
  */
-int slurm_send_node_msg(slurm_fd_t fd, slurm_msg_t * msg)
+int slurm_send_node_msg(int fd, slurm_msg_t * msg)
 {
 	header_t header;
 	Buf      buffer;
@@ -3766,13 +3765,13 @@ int slurm_send_node_msg(slurm_fd_t fd, slurm_msg_t * msg)
  * IN timeout		- how long to wait in milliseconds
  * RET size_t		- bytes sent , or -1 on errror
  */
-size_t slurm_write_stream(slurm_fd_t open_fd, char *buffer, size_t size)
+size_t slurm_write_stream(int open_fd, char *buffer, size_t size)
 {
 	return slurm_send_timeout(open_fd, buffer, size,
 				  SLURM_PROTOCOL_NO_SEND_RECV_FLAGS,
 				  (slurm_get_msg_timeout() * 1000));
 }
-size_t slurm_write_stream_timeout(slurm_fd_t open_fd, char *buffer,
+size_t slurm_write_stream_timeout(int open_fd, char *buffer,
 				  size_t size, int timeout)
 {
 	return slurm_send_timeout(open_fd, buffer, size,
@@ -3788,13 +3787,13 @@ size_t slurm_write_stream_timeout(slurm_fd_t open_fd, char *buffer,
  * IN timeout	- how long to wait in milliseconds
  * RET size_t	- bytes read , or -1 on errror
  */
-size_t slurm_read_stream(slurm_fd_t open_fd, char *buffer, size_t size)
+size_t slurm_read_stream(int open_fd, char *buffer, size_t size)
 {
 	return slurm_recv_timeout(open_fd, buffer, size,
 				   SLURM_PROTOCOL_NO_SEND_RECV_FLAGS,
 				   (slurm_get_msg_timeout() * 1000));
 }
-size_t slurm_read_stream_timeout(slurm_fd_t open_fd, char *buffer,
+size_t slurm_read_stream_timeout(int open_fd, char *buffer,
 				 size_t size, int timeout)
 {
 	return slurm_recv_timeout(open_fd, buffer, size,
@@ -3837,7 +3836,7 @@ void slurm_get_ip_str(slurm_addr_t * slurm_address, uint16_t * port,
  * IN fd		- an open connection
  * OUT slurm_address	- place to park the peer's slurm_addr
  */
-int slurm_get_peer_addr(slurm_fd_t fd, slurm_addr_t * slurm_address)
+int slurm_get_peer_addr(int fd, slurm_addr_t * slurm_address)
 {
 	struct sockaddr name;
 	socklen_t namelen = (socklen_t) sizeof(struct sockaddr);
@@ -4011,7 +4010,7 @@ int slurm_send_rc_err_msg(slurm_msg_t *msg, int rc, char *err_msg)
  * RET int	- returns 0 on success, -1 on failure and sets errno
  */
 static int
-_send_and_recv_msg(slurm_fd_t fd, slurm_msg_t *req,
+_send_and_recv_msg(int fd, slurm_msg_t *req,
 		   slurm_msg_t *resp, int timeout)
 {
 	int retry = 0;
@@ -4051,7 +4050,7 @@ _send_and_recv_msg(slurm_fd_t fd, slurm_msg_t *req,
  *		  (ret_data_info_t).
  */
 static List
-_send_and_recv_msgs(slurm_fd_t fd, slurm_msg_t *req, int timeout)
+_send_and_recv_msgs(int fd, slurm_msg_t *req, int timeout)
 {
 	int retry = 0;
 	List ret_list = NULL;
@@ -4110,7 +4109,7 @@ _send_and_recv_msgs(slurm_fd_t fd, slurm_msg_t *req, int timeout)
  */
 int slurm_send_recv_controller_msg(slurm_msg_t *req, slurm_msg_t *resp)
 {
-	slurm_fd_t fd = -1;
+	int fd = -1;
 	int rc = 0;
 	time_t start_time = time(NULL);
 	int retry = 1;
@@ -4194,7 +4193,7 @@ cleanup:
  */
 int slurm_send_recv_node_msg(slurm_msg_t *req, slurm_msg_t *resp, int timeout)
 {
-	slurm_fd_t fd = -1;
+	int fd = -1;
 
 	resp->auth_cred = NULL;
 	if ((fd = slurm_open_msg_conn(&req->address)) < 0)
@@ -4215,7 +4214,7 @@ int slurm_send_only_controller_msg(slurm_msg_t *req)
 {
 	int      rc = SLURM_SUCCESS;
 	int      retry = 0;
-	slurm_fd_t fd = -1;
+	int fd = -1;
 	slurm_addr_t ctrl_addr;
 	bool     use_backup = false;
 
@@ -4258,9 +4257,9 @@ cleanup:
  */
 int slurm_send_only_node_msg(slurm_msg_t *req)
 {
-	int      rc = SLURM_SUCCESS;
-	int      retry = 0;
-	slurm_fd_t fd = -1;
+	int rc = SLURM_SUCCESS;
+	int retry = 0;
+	int fd = -1;
 
 	if ((fd = slurm_open_msg_conn(&req->address)) < 0) {
 		return SLURM_SOCKET_ERROR;
@@ -4331,7 +4330,7 @@ List slurm_send_addr_recv_msgs(slurm_msg_t *msg, char *name, int timeout)
 	static pthread_mutex_t conn_lock = PTHREAD_MUTEX_INITIALIZER;
 	static uint16_t conn_timeout = (uint16_t) NO_VAL;
 	List ret_list = NULL;
-	slurm_fd_t fd = -1;
+	int fd = -1;
 	ret_data_info_t *ret_data_info = NULL;
 	ListIterator itr;
 	int i;
@@ -4387,7 +4386,7 @@ List slurm_send_addr_recv_msgs(slurm_msg_t *msg, char *name, int timeout)
  */
 int slurm_send_recv_rc_msg_only_one(slurm_msg_t *req, int *rc, int timeout)
 {
-	slurm_fd_t fd = -1;
+	int fd = -1;
 	int ret_c = 0;
 	slurm_msg_t resp;
 
diff --git a/src/common/slurm_protocol_api.h b/src/common/slurm_protocol_api.h
index da476c101f6..3208d297d96 100644
--- a/src/common/slurm_protocol_api.h
+++ b/src/common/slurm_protocol_api.h
@@ -906,7 +906,7 @@ extern uint16_t slurm_get_prolog_timeout(void);
  * IN port		- port to bind the msg server to
  * RET slurm_fd		- file descriptor of the connection created
  */
-extern slurm_fd_t slurm_init_msg_engine_port(uint16_t port);
+extern int slurm_init_msg_engine_port(uint16_t port);
 
 /* Creates a TCP socket and binds to a port in the given
  * range.
@@ -915,7 +915,7 @@ extern slurm_fd_t slurm_init_msg_engine_port(uint16_t port);
  *            to bind
  * RET slurm_fd - file descriptor of the listening socket
  */
-extern slurm_fd_t slurm_init_msg_engine_ports(uint16_t *);
+extern int slurm_init_msg_engine_ports(uint16_t *);
 
 /* sock_bind_range()
  *
@@ -930,7 +930,7 @@ extern int sock_bind_range(int, uint16_t *);
  * IN port		- port to bind the msg server to
  * RET slurm_fd		- file descriptor of the connection created
  */
-extern slurm_fd_t slurm_init_msg_engine_addrname_port(char *addr_name,
+extern int slurm_init_msg_engine_addrname_port(char *addr_name,
 						    uint16_t port);
 
 /* In the socket implementation it creates a socket, binds to it, and
@@ -938,21 +938,20 @@ extern slurm_fd_t slurm_init_msg_engine_addrname_port(char *addr_name,
  * IN slurm_address 	- slurm_addr_t to bind the msg server to
  * RET slurm_fd		- file descriptor of the connection created
  */
-extern slurm_fd_t slurm_init_msg_engine(slurm_addr_t * slurm_address);
+extern int slurm_init_msg_engine(slurm_addr_t * slurm_address);
 
 /* In the bsd implmentation maps directly to a accept call
  * IN open_fd		- file descriptor to accept connection on
  * OUT slurm_address 	- slurm_addr_t of the accepted connection
  * RET slurm_fd		- file descriptor of the connection created
  */
-extern slurm_fd_t slurm_accept_msg_conn(slurm_fd_t open_fd,
-				      slurm_addr_t * slurm_address);
+extern int slurm_accept_msg_conn(int open_fd, slurm_addr_t * slurm_address);
 
 /* just calls close on an established msg connection
  * IN open_fd	- an open file descriptor to close
  * RET int	- the return code
  */
-extern int slurm_shutdown_msg_engine(slurm_fd_t open_fd);
+extern int slurm_shutdown_msg_engine(int open_fd);
 
 /**********************************************************************\
  * receive message functions
@@ -972,7 +971,7 @@ extern int slurm_shutdown_msg_engine(slurm_fd_t open_fd);
  * IN timeout	- how long to wait in milliseconds
  * RET int	- returns 0 on success, -1 on failure and sets errno
  */
-int slurm_receive_msg(slurm_fd_t fd, slurm_msg_t *msg, int timeout);
+int slurm_receive_msg(int fd, slurm_msg_t *msg, int timeout);
 
 /*
  *  Receive a slurm message on the open slurm descriptor "fd" waiting
@@ -989,7 +988,7 @@ int slurm_receive_msg(slurm_fd_t fd, slurm_msg_t *msg, int timeout);
  *                (ret_data_info_t). NULL is returned on failure. and
  *                errno set.
  */
-List slurm_receive_msgs(slurm_fd_t fd, int steps, int timeout);
+List slurm_receive_msgs(int fd, int steps, int timeout);
 
 /*
  *  Receive a slurm message on the open slurm descriptor "fd" waiting
@@ -1008,7 +1007,7 @@ List slurm_receive_msgs(slurm_fd_t fd, int steps, int timeout);
  * IN timeout	- how long to wait in milliseconds
  * RET int	- returns 0 on success, -1 on failure and sets errno
  */
-int slurm_receive_msg_and_forward(slurm_fd_t fd, slurm_addr_t *orig_addr,
+int slurm_receive_msg_and_forward(int fd, slurm_addr_t *orig_addr,
 				  slurm_msg_t *resp, int timeout);
 
 /**********************************************************************\
@@ -1021,7 +1020,7 @@ int slurm_receive_msg_and_forward(slurm_fd_t fd, slurm_addr_t *orig_addr,
  * IN msg		- a slurm msg struct to be sent
  * RET int		- size of msg sent in bytes
  */
-int slurm_send_node_msg(slurm_fd_t open_fd, slurm_msg_t *msg);
+int slurm_send_node_msg(int open_fd, slurm_msg_t *msg);
 
 /**********************************************************************\
  * msg connection establishment functions used by msg clients
@@ -1034,9 +1033,8 @@ int slurm_send_node_msg(slurm_fd_t open_fd, slurm_msg_t *msg);
  *                     OUT: set to true if connection established with backup
  * RET slurm_fd	- file descriptor of the connection created
  */
-extern slurm_fd_t slurm_open_controller_conn(slurm_addr_t *addr,
-					     bool *use_backup);
-extern slurm_fd_t slurm_open_controller_conn_spec(enum controller_id dest);
+extern int slurm_open_controller_conn(slurm_addr_t *addr, bool *use_backup);
+extern int slurm_open_controller_conn_spec(enum controller_id dest);
 
 /* In the bsd socket implementation it creates a SOCK_STREAM socket
  *	and calls connect on it a SOCK_DGRAM socket called with connect
@@ -1046,13 +1044,13 @@ extern slurm_fd_t slurm_open_controller_conn_spec(enum controller_id dest);
  * IN slurm_address 	- slurm_addr_t of the connection destination
  * RET slurm_fd		- file descriptor of the connection created
  */
-extern slurm_fd_t slurm_open_msg_conn(slurm_addr_t * slurm_address);
+extern int slurm_open_msg_conn(slurm_addr_t * slurm_address);
 
 /* just calls close on an established msg connection to close
  * IN open_fd	- an open file descriptor to close
  * RET int	- the return code
  */
-extern int slurm_shutdown_msg_conn(slurm_fd_t open_fd);
+extern int slurm_shutdown_msg_conn(int open_fd);
 
 
 /**********************************************************************\
@@ -1067,9 +1065,8 @@ extern int slurm_shutdown_msg_conn(slurm_fd_t open_fd);
  * IN timeout		- how long to wait in milliseconds
  * RET size_t		- bytes sent , or -1 on errror
  */
-extern size_t slurm_write_stream(slurm_fd_t open_fd, char *buffer,
-				 size_t size);
-extern size_t slurm_write_stream_timeout(slurm_fd_t open_fd,
+extern size_t slurm_write_stream(int open_fd, char *buffer, size_t size);
+extern size_t slurm_write_stream_timeout(int open_fd,
 					 char *buffer, size_t size,
 					 int timeout);
 
@@ -1081,9 +1078,8 @@ extern size_t slurm_write_stream_timeout(slurm_fd_t open_fd,
  * IN timeout		- how long to wait in milliseconds
  * RET size_t		- bytes read , or -1 on errror
  */
-extern size_t slurm_read_stream(slurm_fd_t open_fd, char *buffer,
-				size_t size);
-extern size_t slurm_read_stream_timeout(slurm_fd_t open_fd,
+extern size_t slurm_read_stream(int open_fd, char *buffer, size_t size);
+extern size_t slurm_read_stream_timeout(int open_fd,
 					char *buffer, size_t size,
 					int timeout);
 
@@ -1115,7 +1111,7 @@ extern void slurm_get_ip_str(slurm_addr_t * slurm_address, uint16_t * port,
  * IN fd		- an open connection
  * OUT slurm_address	- place to park the peer's slurm_addr
  */
-extern int slurm_get_peer_addr(slurm_fd_t fd, slurm_addr_t * slurm_address);
+extern int slurm_get_peer_addr(int fd, slurm_addr_t * slurm_address);
 
 /**********************************************************************\
  * slurm_addr_t pack routines
diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h
index bfa7b68993b..add58eab236 100644
--- a/src/common/slurm_protocol_defs.h
+++ b/src/common/slurm_protocol_defs.h
@@ -427,7 +427,7 @@ typedef struct slurm_protocol_config {
 typedef struct slurm_msg {
 	slurm_addr_t address;
 	void *auth_cred;
-	slurm_fd_t conn_fd;
+	int conn_fd;
 	void *data;
 	uint32_t data_size;
 	uint16_t flags;
diff --git a/src/common/slurm_protocol_interface.h b/src/common/slurm_protocol_interface.h
index d97fe45b616..6029f9818fe 100644
--- a/src/common/slurm_protocol_interface.h
+++ b/src/common/slurm_protocol_interface.h
@@ -84,7 +84,7 @@ typedef enum slurm_socket_type {
  * timing out after `timeout' milliseconds.
  *
  */
-extern ssize_t slurm_msg_recvfrom_timeout(slurm_fd_t fd, char **buf,
+extern ssize_t slurm_msg_recvfrom_timeout(int fd, char **buf,
 		size_t *len, uint32_t flags, int timeout);
 
 /* slurm_msg_sendto
@@ -95,12 +95,17 @@ extern ssize_t slurm_msg_recvfrom_timeout(slurm_fd_t fd, char **buf,
  * IN flags - communication specific flags
  * RET number of bytes written
  */
-extern ssize_t slurm_msg_sendto ( slurm_fd_t open_fd, char *buffer ,
-			   size_t size , uint32_t flags ) ;
+extern ssize_t slurm_msg_sendto(int open_fd,
+				char *buffer,
+				size_t size,
+				uint32_t flags);
 /* slurm_msg_sendto_timeout is identical to _slurm_msg_sendto except
  * IN timeout - maximum time to wait for a message in milliseconds */
-extern ssize_t slurm_msg_sendto_timeout ( slurm_fd_t open_fd, char *buffer,
-				   size_t size, uint32_t flags, int timeout );
+extern ssize_t slurm_msg_sendto_timeout(int open_fd,
+					char *buffer,
+					size_t size,
+					uint32_t flags,
+					int timeout);
 
 /********************/
 /* stream functions */
@@ -109,41 +114,38 @@ extern ssize_t slurm_msg_sendto_timeout ( slurm_fd_t open_fd, char *buffer,
 /* slurm_init_msg_engine
  * opens a stream server and listens on it
  * IN slurm_address 	- slurm_addr_t to bind the server stream to
- * RET slurm_fd		- file descriptor of the stream created
+ * RET fd		- file descriptor of the stream created
  */
-extern slurm_fd_t slurm_init_msg_engine ( slurm_addr_t * slurm_address ) ;
+extern int slurm_init_msg_engine(slurm_addr_t *slurm_address);
 
 /* slurm_accept_msg_conn
  * accepts a incoming stream connection on a stream server slurm_fd
  * IN open_fd		- file descriptor to accept connection on
  * OUT slurm_address 	- slurm_addr_t of the accepted connection
- * RET slurm_fd		- file descriptor of the accepted connection
+ * RET int		- file descriptor of the accepted connection
  */
-extern slurm_fd_t slurm_accept_msg_conn ( slurm_fd_t open_fd ,
-				slurm_addr_t * slurm_address ) ;
+extern int slurm_accept_msg_conn(int open_fd, slurm_addr_t *slurm_address);
 
 /* slurm_open_stream
  * opens a client connection to stream server
  * IN slurm_address 	- slurm_addr_t of the connection destination
  * IN retry             - if true, retry as needed with various ports
  *                        to avoid socket address collision
- * RET slurm_fd_t         - file descriptor of the connection created
+ * RET int              - file descriptor of the connection created
  */
-extern slurm_fd_t slurm_open_stream ( slurm_addr_t * slurm_address,
-				      bool retry ) ;
+extern int slurm_open_stream(slurm_addr_t *slurm_address, bool retry);
 
 /* slurm_get_stream_addr
  * esentially a encapsilated get_sockname
  * IN open_fd 		- file descriptor to retreive slurm_addr_t for
  * OUT address		- address that open_fd to bound to
  */
-extern int slurm_get_stream_addr ( slurm_fd_t open_fd ,
-				   slurm_addr_t * address ) ;
+extern int slurm_get_stream_addr(int open_fd, slurm_addr_t *address);
 
-extern int slurm_send_timeout ( slurm_fd_t open_fd, char *buffer ,
-				size_t size , uint32_t flags, int timeout ) ;
-extern int slurm_recv_timeout ( slurm_fd_t open_fd, char *buffer ,
-				size_t size , uint32_t flags, int timeout ) ;
+extern int slurm_send_timeout(int open_fd, char *buffer, size_t size,
+			      uint32_t flags, int timeout);
+extern int slurm_recv_timeout(int open_fd, char *buffer, size_t size,
+			      uint32_t flags, int timeout);
 
 /***************************/
 /* slurm address functions */
diff --git a/src/common/slurm_protocol_socket_common.h b/src/common/slurm_protocol_socket_common.h
index 2d44e7f72d4..59c4a46c4a8 100644
--- a/src/common/slurm_protocol_socket_common.h
+++ b/src/common/slurm_protocol_socket_common.h
@@ -43,11 +43,6 @@
 #include <inttypes.h>
 #include <netinet/in.h>
 
-/* LINUX SPECIFIC */
-/* this is the slurm equivalent of the operating system file descriptor,
- * which in linux is just an int */
-typedef int32_t slurm_fd_t ;
-
 /* this is the slurm equivalent of the BSD sockets sockaddr
  * also defined in slurm/slurm.h for users */
 #ifndef __slurm_addr_t_defined
diff --git a/src/common/slurm_protocol_socket_implementation.c b/src/common/slurm_protocol_socket_implementation.c
index a490b548774..51cd423cc8a 100644
--- a/src/common/slurm_protocol_socket_implementation.c
+++ b/src/common/slurm_protocol_socket_implementation.c
@@ -80,9 +80,9 @@
 
 
 /* Static functions */
-static int _slurm_connect (int __fd, struct sockaddr const * __addr,
-			   socklen_t __len);
-static slurm_fd_t _slurm_create_socket ( slurm_socket_type_t type );
+static int _slurm_connect(int __fd, struct sockaddr const * __addr,
+			  socklen_t __len);
+static int _slurm_create_socket ( slurm_socket_type_t type );
 static int _slurm_vfcntl(int fd, int cmd, va_list va );
 static int _slurm_fcntl(int fd, int cmd, ... );
 static int _slurm_socket (int __domain, int __type, int __protocol);
@@ -139,8 +139,8 @@ static void _sock_bind_wild(int sockfd)
 	return;
 }
 
-extern ssize_t slurm_msg_recvfrom_timeout(slurm_fd_t fd, char **pbuf,
-		size_t *lenp, uint32_t flags, int tmout)
+extern ssize_t slurm_msg_recvfrom_timeout(int fd, char **pbuf, size_t *lenp,
+					  uint32_t flags, int tmout)
 {
 	ssize_t  len;
 	uint32_t msglen;
@@ -172,14 +172,14 @@ extern ssize_t slurm_msg_recvfrom_timeout(slurm_fd_t fd, char **pbuf,
 	return (ssize_t) msglen;
 }
 
-extern ssize_t slurm_msg_sendto(slurm_fd_t fd, char *buffer, size_t size,
+extern ssize_t slurm_msg_sendto(int fd, char *buffer, size_t size,
 				uint32_t flags)
 {
 	return slurm_msg_sendto_timeout( fd, buffer, size, flags,
 				(slurm_get_msg_timeout() * 1000));
 }
 
-ssize_t slurm_msg_sendto_timeout(slurm_fd_t fd, char *buffer, size_t size,
+ssize_t slurm_msg_sendto_timeout(int fd, char *buffer, size_t size,
 				 uint32_t flags, int timeout)
 {
 	int   len;
@@ -210,7 +210,7 @@ ssize_t slurm_msg_sendto_timeout(slurm_fd_t fd, char *buffer, size_t size,
 
 /* Send slurm message with timeout
  * RET message size (as specified in argument) or SLURM_ERROR on error */
-extern int slurm_send_timeout(slurm_fd_t fd, char *buf, size_t size,
+extern int slurm_send_timeout(int fd, char *buf, size_t size,
 			      uint32_t flags, int timeout)
 {
 	int rc;
@@ -317,7 +317,7 @@ extern int slurm_send_timeout(slurm_fd_t fd, char *buf, size_t size,
 
 /* Get slurm message with timeout
  * RET message size (as specified in argument) or SLURM_ERROR on error */
-extern int slurm_recv_timeout(slurm_fd_t fd, char *buffer, size_t size,
+extern int slurm_recv_timeout(int fd, char *buffer, size_t size,
 			      uint32_t flags, int timeout )
 {
 	int rc;
@@ -415,10 +415,10 @@ extern int slurm_recv_timeout(slurm_fd_t fd, char *buffer, size_t size,
 	return recvlen;
 }
 
-extern slurm_fd_t slurm_init_msg_engine(slurm_addr_t *addr)
+extern int slurm_init_msg_engine(slurm_addr_t *addr)
 {
 	int rc;
-	slurm_fd_t fd;
+	int fd;
 	const int one = 1;
 	const size_t sz1 = sizeof(one);
 
@@ -459,16 +459,16 @@ extern slurm_fd_t slurm_init_msg_engine(slurm_addr_t *addr)
  * set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting
  * peer and *ADDR_LEN to the address's actual length, and return the
  * new socket's descriptor, or -1 for errors.  */
-extern slurm_fd_t slurm_accept_msg_conn(slurm_fd_t fd, slurm_addr_t *addr)
+extern int slurm_accept_msg_conn(int fd, slurm_addr_t *addr)
 {
 	socklen_t len = sizeof(slurm_addr_t);
 	return accept(fd, (struct sockaddr *)addr, &len);
 }
 
-extern slurm_fd_t slurm_open_stream(slurm_addr_t *addr, bool retry)
+extern int slurm_open_stream(slurm_addr_t *addr, bool retry)
 {
 	int retry_cnt;
-	slurm_fd_t fd;
+	int fd;
 	uint16_t port;
 	char ip[32];
 
@@ -520,7 +520,7 @@ extern slurm_fd_t slurm_open_stream(slurm_addr_t *addr, bool retry)
 }
 
 /* Put the local address of FD into *ADDR and its length in *LEN.  */
-extern int slurm_get_stream_addr(slurm_fd_t fd, slurm_addr_t *addr )
+extern int slurm_get_stream_addr(int fd, slurm_addr_t *addr )
 {
 	socklen_t size = sizeof(addr);
 	return getsockname(fd, (struct sockaddr *)addr, &size);
@@ -534,10 +534,9 @@ static int _slurm_socket (int __domain, int __type, int __protocol)
 /* Create a socket of the specified type
  * IN type - SLURM_STREAM or SLURM_MESSAGE
  */
-static slurm_fd_t _slurm_create_socket ( slurm_socket_type_t type )
+static int _slurm_create_socket ( slurm_socket_type_t type )
 {
-	switch ( type )
-	{
+	switch (type) {
 		case SLURM_STREAM :
 			return _slurm_socket ( AF_INET, SOCK_STREAM,
 					      IPPROTO_TCP) ;
diff --git a/src/common/slurmdbd_defs.c b/src/common/slurmdbd_defs.c
index 42bfd8e9019..cf103e462eb 100644
--- a/src/common/slurmdbd_defs.c
+++ b/src/common/slurmdbd_defs.c
@@ -92,7 +92,7 @@ static time_t    agent_shutdown = 0;
 
 static pthread_mutex_t slurmdbd_lock = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t  slurmdbd_cond = PTHREAD_COND_INITIALIZER;
-static slurm_fd_t  slurmdbd_fd         = -1;
+static int       slurmdbd_fd         = -1;
 static char *    slurmdbd_auth_info  = NULL;
 static char *    slurmdbd_cluster    = NULL;
 static bool      rollback_started    = 0;
@@ -105,8 +105,8 @@ static bool      need_to_register    = 0;
 static void * _agent(void *x);
 static void   _close_slurmdbd_fd(void);
 static void   _create_agent(void);
-static bool   _fd_readable(slurm_fd_t fd, int read_timeout);
-static int    _fd_writeable(slurm_fd_t fd);
+static bool   _fd_readable(int fd, int read_timeout);
+static int    _fd_writeable(int fd);
 static int    _get_return_code(uint16_t rpc_version, int read_timeout);
 static Buf    _load_dbd_rec(int fd);
 static void   _load_dbd_state(void);
@@ -1907,7 +1907,7 @@ static int _tot_wait (struct timeval *start_time)
 
 /* Wait until a file is readable,
  * RET false if can not be read */
-static bool _fd_readable(slurm_fd_t fd, int read_timeout)
+static bool _fd_readable(int fd, int read_timeout)
 {
 	struct pollfd ufds;
 	int rc, time_left;
@@ -1957,7 +1957,7 @@ static bool _fd_readable(slurm_fd_t fd, int read_timeout)
  *     0 if can not be written to within 5 seconds
  *     -1 if file has been closed POLLHUP
  */
-static int _fd_writeable(slurm_fd_t fd)
+static int _fd_writeable(int fd)
 {
 	struct pollfd ufds;
 	int write_timeout = 5000;
diff --git a/src/plugins/accounting_storage/common/common_as.c b/src/plugins/accounting_storage/common/common_as.c
index 038814696c7..b59a8ac2e55 100644
--- a/src/plugins/accounting_storage/common/common_as.c
+++ b/src/plugins/accounting_storage/common/common_as.c
@@ -340,7 +340,7 @@ extern void dump_update_list(List update_list)
 extern int cluster_first_reg(char *host, uint16_t port, uint16_t rpc_version)
 {
 	slurm_addr_t ctld_address;
-	slurm_fd_t fd;
+	int fd;
 	int rc = SLURM_SUCCESS;
 
 	info("First time to register cluster requesting "
diff --git a/src/plugins/launch/aprun/launch_aprun.c b/src/plugins/launch/aprun/launch_aprun.c
index b0fe6a87edf..57991b82ed5 100644
--- a/src/plugins/launch/aprun/launch_aprun.c
+++ b/src/plugins/launch/aprun/launch_aprun.c
@@ -360,7 +360,7 @@ static void _handle_msg(slurm_msg_t *msg)
 static void *_msg_thr_internal(void *arg)
 {
 	slurm_addr_t cli_addr;
-	slurm_fd_t newsockfd;
+	int newsockfd;
 	slurm_msg_t *msg;
 	int *slurmctld_fd_ptr = (int *)arg;
 
diff --git a/src/plugins/launch/runjob/launch_runjob.c b/src/plugins/launch/runjob/launch_runjob.c
index 461eb2885ba..449664877db 100644
--- a/src/plugins/launch/runjob/launch_runjob.c
+++ b/src/plugins/launch/runjob/launch_runjob.c
@@ -179,7 +179,7 @@ _handle_msg(slurm_msg_t *msg)
 static void *_msg_thr_internal(void *arg)
 {
 	slurm_addr_t cli_addr;
-	slurm_fd_t newsockfd;
+	int newsockfd;
 	slurm_msg_t *msg;
 	int *slurmctld_fd_ptr = (int *)arg;
 
diff --git a/src/plugins/sched/wiki/msg.c b/src/plugins/sched/wiki/msg.c
index c223ef970e2..cc21515ad00 100644
--- a/src/plugins/sched/wiki/msg.c
+++ b/src/plugins/sched/wiki/msg.c
@@ -69,11 +69,11 @@ uint16_t use_host_exp = 0;
 
 static void *	_msg_thread(void *no_data);
 static int	_parse_msg(char *msg, char **req);
-static void	_proc_msg(slurm_fd_t new_fd, char *msg);
+static void	_proc_msg(int new_fd, char *msg);
 static size_t	_read_bytes(int fd, char *buf, const size_t size);
-static char *	_recv_msg(slurm_fd_t new_fd);
-static size_t	_send_msg(slurm_fd_t new_fd, char *buf, size_t size);
-static void	_send_reply(slurm_fd_t new_fd, char *response);
+static char *	_recv_msg(int new_fd);
+static size_t	_send_msg(int new_fd, char *buf, size_t size);
+static void	_send_reply(int new_fd, char *response);
 static size_t	_write_bytes(int fd, char *buf, const size_t size);
 
 /*****************************************************************************\
@@ -141,7 +141,7 @@ extern void term_msg_thread(void)
 \*****************************************************************************/
 static void *_msg_thread(void *no_data)
 {
-	slurm_fd_t sock_fd = -1, new_fd;
+	int sock_fd = -1, new_fd;
 	slurm_addr_t cli_addr;
 	char *msg;
 	slurm_ctl_conf_t *conf;
@@ -469,7 +469,7 @@ static size_t	_write_bytes(int fd, char *buf, const size_t size)
  * RET - The message which must be xfreed or
  *       NULL on error
 \*****************************************************************************/
-static char *	_recv_msg(slurm_fd_t new_fd)
+static char *	_recv_msg(int new_fd)
 {
 	char header[10];
 	unsigned long size;
@@ -509,7 +509,7 @@ static char *	_recv_msg(slurm_fd_t new_fd)
  *
  * RET - Number of data bytes written (excludes header)
 \*****************************************************************************/
-static size_t	_send_msg(slurm_fd_t new_fd, char *buf, size_t size)
+static size_t	_send_msg(int new_fd, char *buf, size_t size)
 {
 	char header[10];
 	size_t data_sent;
@@ -610,7 +610,7 @@ static int	_parse_msg(char *msg, char **req)
 /*****************************************************************************\
  * Parse, process and respond to a request
 \*****************************************************************************/
-static void	_proc_msg(slurm_fd_t new_fd, char *msg)
+static void	_proc_msg(int new_fd, char *msg)
 {
 	DEF_TIMERS;
 	char *req, *cmd_ptr, *msg_type = NULL;
@@ -683,7 +683,7 @@ static void	_proc_msg(slurm_fd_t new_fd, char *msg)
 	return;
 }
 
-static void	_send_reply(slurm_fd_t new_fd, char *response)
+static void _send_reply(int new_fd, char *response)
 {
 	size_t i;
 	char *buf, sum[20], *tmp;
diff --git a/src/plugins/sched/wiki2/event.c b/src/plugins/sched/wiki2/event.c
index 7916ad2328a..48a28a84786 100644
--- a/src/plugins/sched/wiki2/event.c
+++ b/src/plugins/sched/wiki2/event.c
@@ -43,7 +43,7 @@ static pthread_mutex_t	event_mutex = PTHREAD_MUTEX_INITIALIZER;
 static time_t		last_notify_time = (time_t) 0;
 static slurm_addr_t	moab_event_addr,  moab_event_addr_bu;
 static int		event_addr_set = 0;
-static slurm_fd_t	event_fd = (slurm_fd_t) -1;
+static int		event_fd = -1;
 
 /* Open event_fd as needed
  * RET 0 on success, -1 on failure */
diff --git a/src/plugins/sched/wiki2/msg.c b/src/plugins/sched/wiki2/msg.c
index d38aab0cd6f..866237b75bd 100644
--- a/src/plugins/sched/wiki2/msg.c
+++ b/src/plugins/sched/wiki2/msg.c
@@ -75,11 +75,11 @@ uint16_t use_host_exp = 0;
 
 static void *	_msg_thread(void *no_data);
 static int	_parse_msg(char *msg, char **req);
-static void	_proc_msg(slurm_fd_t new_fd, char *msg);
+static void	_proc_msg(int new_fd, char *msg);
 static size_t	_read_bytes(int fd, char *buf, size_t size);
-static char *	_recv_msg(slurm_fd_t new_fd);
-static size_t	_send_msg(slurm_fd_t new_fd, char *buf, size_t size);
-static void	_send_reply(slurm_fd_t new_fd, char *response);
+static char *	_recv_msg(int new_fd);
+static size_t	_send_msg(int new_fd, char *buf, size_t size);
+static void	_send_reply(int new_fd, char *response);
 static size_t	_write_bytes(int fd, char *buf, size_t size);
 
 /*****************************************************************************\
@@ -148,7 +148,7 @@ extern void term_msg_thread(void)
 \*****************************************************************************/
 static void *_msg_thread(void *no_data)
 {
-	slurm_fd_t sock_fd = -1, new_fd;
+	int sock_fd = -1, new_fd;
 	slurm_addr_t cli_addr;
 	char *msg;
 	slurm_ctl_conf_t *conf;
@@ -519,7 +519,7 @@ static size_t	_write_bytes(int fd, char *buf, size_t size)
  * RET - The message which must be xfreed or
  *       NULL on error
 \*****************************************************************************/
-static char *	_recv_msg(slurm_fd_t new_fd)
+static char *_recv_msg(int new_fd)
 {
 	char header[10];
 	unsigned long size;
@@ -559,7 +559,7 @@ static char *	_recv_msg(slurm_fd_t new_fd)
  *
  * RET - Number of data bytes written (excludes header)
 \*****************************************************************************/
-static size_t	_send_msg(slurm_fd_t new_fd, char *buf, size_t size)
+static size_t _send_msg(int new_fd, char *buf, size_t size)
 {
 	char header[10];
 	size_t data_sent;
@@ -655,7 +655,7 @@ static int	_parse_msg(char *msg, char **req)
 /*****************************************************************************\
  * Parse, process and respond to a request
 \*****************************************************************************/
-static void	_proc_msg(slurm_fd_t new_fd, char *msg)
+static void _proc_msg(int new_fd, char *msg)
 {
 	DEF_TIMERS;
 	char *req, *cmd_ptr, *msg_type = NULL;
@@ -756,7 +756,7 @@ static void	_proc_msg(slurm_fd_t new_fd, char *msg)
 	return;
 }
 
-static void	_send_reply(slurm_fd_t new_fd, char *response)
+static void _send_reply(int new_fd, char *response)
 {
 	size_t i;
 	char *buf, sum[20], *tmp;
diff --git a/src/plugins/slurmctld/dynalloc/msg.c b/src/plugins/slurmctld/dynalloc/msg.c
index 1774c00323a..ba46a3a36ec 100644
--- a/src/plugins/slurmctld/dynalloc/msg.c
+++ b/src/plugins/slurmctld/dynalloc/msg.c
@@ -73,9 +73,9 @@ static int   err_code;
 static uint16_t sched_port;
 
 static void *	_msg_thread(void *no_data);
-static void		_proc_msg(slurm_fd_t new_fd, char *msg);
-static char *	_recv_msg(slurm_fd_t new_fd);
-static size_t	_send_msg(slurm_fd_t new_fd, char *buf, size_t size);
+static void	_proc_msg(int new_fd, char *msg);
+static char *	_recv_msg(int new_fd);
+static size_t	_send_msg(int new_fd, char *buf, size_t size);
 static size_t	_read_bytes(int fd, char *buf, size_t size);
 static size_t	_write_bytes(int fd, char *buf, size_t size);
 
@@ -161,7 +161,7 @@ extern void term_msg_thread(void)
 \*****************************************************************************/
 static void *_msg_thread(void *no_data)
 {
-	slurm_fd_t sock_fd = -1, new_fd;
+	int sock_fd = -1, new_fd;
 	slurm_addr_t cli_addr;
 	char *msg;
 	int i;
@@ -290,7 +290,7 @@ static size_t 	_write_bytes(int fd, char *buf, size_t size)
  * RET - The message which must be xfreed or
  *       NULL on error
 \*****************************************************************************/
-static char * 	_recv_msg(slurm_fd_t new_fd)
+static char * _recv_msg(int new_fd)
 {
 	char *buf;
 	buf = xmalloc(SIZE + 1);	/* need '\0' on end to print */
@@ -313,7 +313,7 @@ static char * 	_recv_msg(slurm_fd_t new_fd)
  *
  * RET - Number of data bytes written (excludes header)
 \*****************************************************************************/
-static size_t	_send_msg(slurm_fd_t new_fd, char *buf, size_t size)
+static size_t	_send_msg(int new_fd, char *buf, size_t size)
 {
 	size_t data_sent;
 
@@ -331,7 +331,7 @@ static size_t	_send_msg(slurm_fd_t new_fd, char *buf, size_t size)
 /*****************************************************************************\
  * process and respond to a request
 \*****************************************************************************/
-static void	_proc_msg(slurm_fd_t new_fd, char *msg)
+static void _proc_msg(int new_fd, char *msg)
 {
 	char send_buf[SIZE];
 	uint16_t nodes = 0, slots = 0;
@@ -369,7 +369,7 @@ static void	_proc_msg(slurm_fd_t new_fd, char *msg)
 	return;
 }
 
-extern void	send_reply(slurm_fd_t new_fd, char *response)
+extern void send_reply(int new_fd, char *response)
 {
 	_send_msg(new_fd, response, strlen(response)+1);
 }
diff --git a/src/plugins/slurmctld/nonstop/msg.c b/src/plugins/slurmctld/nonstop/msg.c
index 615aea3b4ac..c1746cd21ad 100644
--- a/src/plugins/slurmctld/nonstop/msg.c
+++ b/src/plugins/slurmctld/nonstop/msg.c
@@ -145,7 +145,7 @@ static size_t _write_bytes(int fd, char *buf, size_t size)
 	return size;
 }
 
-static char *_recv_msg(slurm_fd_t new_fd)
+static char *_recv_msg(int new_fd)
 {
 	char header[10];
 	unsigned long size;
@@ -175,7 +175,7 @@ static char *_recv_msg(slurm_fd_t new_fd)
 	return buf;
 }
 
-static void _send_reply(slurm_fd_t new_fd, char *msg)
+static void _send_reply(int new_fd, char *msg)
 {
 	uint32_t data_sent, msg_size = 0;
 	char header[10];
@@ -210,7 +210,7 @@ static char *_decrypt(char *msg, uid_t *uid)
 	return (char *) buf_out;
 }
 
-static void _proc_msg(slurm_fd_t new_fd, char *msg, slurm_addr_t cli_addr)
+static void _proc_msg(int new_fd, char *msg, slurm_addr_t cli_addr)
 {
 	/* Locks: Read job and node data */
 	slurmctld_lock_t job_read_lock = {
@@ -302,7 +302,7 @@ static void _proc_msg(slurm_fd_t new_fd, char *msg, slurm_addr_t cli_addr)
 
 static void *_msg_thread(void *no_data)
 {
-	slurm_fd_t sock_fd = -1, new_fd;
+	int sock_fd = -1, new_fd;
 	slurm_addr_t cli_addr;
 	char *msg;
 	int i;
diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c
index 4758464c112..afec316d653 100644
--- a/src/plugins/switch/nrt/libpermapi/shr_64.c
+++ b/src/plugins/switch/nrt/libpermapi/shr_64.c
@@ -96,7 +96,7 @@ extern FILE *pmd_lfp;
 
 typedef struct agent_data {
 	uint32_t   fe_auth_key;
-	slurm_fd_t fe_comm_socket;
+	int fe_comm_socket;
 } agent_data_t;
 
 static char *_name_from_addr(char *addr)
@@ -244,7 +244,7 @@ unpack_error:
 
 /* Validate a message connection
  * Return: true=valid/authenticated */
-static bool _validate_connect(slurm_fd_t socket_conn, uint32_t auth_key)
+static bool _validate_connect(int socket_conn, uint32_t auth_key)
 {
 	struct timeval tv;
 	fd_set read_fds;
@@ -282,9 +282,9 @@ static bool _validate_connect(slurm_fd_t socket_conn, uint32_t auth_key)
 }
 
 /* Process a message from PMD */
-static void _agent_proc_connect(slurm_fd_t fe_comm_socket,uint32_t fe_auth_key)
+static void _agent_proc_connect(int fe_comm_socket,uint32_t fe_auth_key)
 {
-	slurm_fd_t fe_comm_conn = -1;
+	int fe_comm_conn = -1;
 	slurm_addr_t be_addr;
 	bool be_connected = false;
 	Buf buffer = NULL;
@@ -346,7 +346,7 @@ static void *_agent_thread(void *arg)
 {
         agent_data_t *agent_data_ptr = (agent_data_t *) arg;
 	uint32_t   fe_auth_key    = agent_data_ptr->fe_auth_key;
-	slurm_fd_t fe_comm_socket = agent_data_ptr->fe_comm_socket;
+	int fe_comm_socket = agent_data_ptr->fe_comm_socket;
 	fd_set except_fds, read_fds;
 	struct timeval tv;
 	int i, n_fds;
@@ -396,7 +396,7 @@ static void _spawn_fe_agent(void)
 {
 	char hostname[256];
 	uint32_t   fe_auth_key = 0;
-	slurm_fd_t fe_comm_socket = -1;
+	int fe_comm_socket = -1;
 	slurm_addr_t comm_addr;
 	uint16_t comm_port;
 	pthread_attr_t agent_attr;
@@ -484,7 +484,7 @@ srun_job_t * _read_job_srun_agent(void)
 	char *key_str  = getenv("SLURM_FE_KEY");
 	char *sock_str = getenv("SLURM_FE_SOCKET");
 	char buf[32], *host, *sep;
-	slurm_fd_t resp_socket;
+	int resp_socket;
 	uint16_t resp_port;
 	uint32_t resp_auth_key, buf_size;
 	srun_job_t *srun_job = NULL;
diff --git a/src/slurmctld/backup.c b/src/slurmctld/backup.c
index 43f95d26341..dbe1b32b89d 100644
--- a/src/slurmctld/backup.c
+++ b/src/slurmctld/backup.c
@@ -301,8 +301,8 @@ static void _sig_handler(int signal)
  *	controller (that's us) */
 static void *_background_rpc_mgr(void *no_data)
 {
-	slurm_fd_t newsockfd;
-	slurm_fd_t sockfd;
+	int newsockfd;
+	int sockfd;
 	slurm_addr_t cli_addr;
 	slurm_msg_t *msg = NULL;
 	int error_code;
diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c
index 25eee7bff22..e63a05a5c73 100644
--- a/src/slurmctld/controller.c
+++ b/src/slurmctld/controller.c
@@ -908,8 +908,8 @@ static void _sig_handler(int signal)
 /* _slurmctld_rpc_mgr - Read incoming RPCs and create pthread for each */
 static void *_slurmctld_rpc_mgr(void *no_data)
 {
-	slurm_fd_t newsockfd;
-	slurm_fd_t *sockfd;	/* our set of socket file descriptors */
+	int newsockfd;
+	int *sockfd;	/* our set of socket file descriptors */
 	slurm_addr_t cli_addr, srv_addr;
 	uint16_t port;
 	char ip[32];
@@ -962,7 +962,7 @@ static void *_slurmctld_rpc_mgr(void *no_data)
 		fatal("slurmctld port count is zero");
 		return NULL;	/* Fix CLANG false positive */
 	}
-	sockfd = xmalloc(sizeof(slurm_fd_t) * nports);
+	sockfd = xmalloc(sizeof(int) * nports);
 	for (i=0; i<nports; i++) {
 		sockfd[i] = slurm_init_msg_engine_addrname_port(
 					node_addr,
diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c
index 427e1d9b506..4ac1e8ddc4f 100644
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -13248,7 +13248,7 @@ static int _job_suspend(struct job_record *job_ptr, uint16_t op, bool indf_susp)
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid,
-		       slurm_fd_t conn_fd, bool indf_susp,
+		       int conn_fd, bool indf_susp,
 		       uint16_t protocol_version)
 {
 	int rc = SLURM_SUCCESS;
@@ -13313,7 +13313,7 @@ extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_suspend2(suspend_msg_t *sus_ptr, uid_t uid,
-			slurm_fd_t conn_fd, bool indf_susp,
+			int conn_fd, bool indf_susp,
 			uint16_t protocol_version)
 {
 	slurm_ctl_conf_t *conf;
@@ -13621,7 +13621,7 @@ reply:
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_requeue(uid_t uid, uint32_t job_id,
-		       slurm_fd_t conn_fd, uint16_t protocol_version,
+		       int conn_fd, uint16_t protocol_version,
 		       bool preempt, uint32_t state)
 {
 	int rc = SLURM_SUCCESS;
@@ -13658,8 +13658,8 @@ extern int job_requeue(uid_t uid, uint32_t job_id,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_requeue2(uid_t uid, requeue_msg_t *req_ptr,
-		       slurm_fd_t conn_fd, uint16_t protocol_version,
-		       bool preempt)
+		        int conn_fd, uint16_t protocol_version,
+		        bool preempt)
 {
 	slurm_ctl_conf_t *conf;
 	int rc = SLURM_SUCCESS, rc2;
@@ -13883,7 +13883,7 @@ static int _set_top(struct job_record *job_ptr, uid_t uid)
  * IN protocol_version - slurm protocol version of client
  * RET 0 on success, otherwise ESLURM error code
  */
-extern int job_set_top(top_job_msg_t *top_ptr, uid_t uid, slurm_fd_t conn_fd,
+extern int job_set_top(top_job_msg_t *top_ptr, uid_t uid, int conn_fd,
 		       uint16_t protocol_version)
 {
 	int rc = SLURM_SUCCESS;
@@ -14309,7 +14309,7 @@ extern int send_jobs_to_accounting(void)
 
 /* Perform checkpoint operation on a job */
 extern int job_checkpoint(checkpoint_msg_t *ckpt_ptr, uid_t uid,
-			  slurm_fd_t conn_fd, uint16_t protocol_version)
+			  int conn_fd, uint16_t protocol_version)
 {
 	int rc = SLURM_SUCCESS;
 	struct job_record *job_ptr;
@@ -14719,7 +14719,7 @@ _copy_job_record_to_job_desc(struct job_record *job_ptr)
  * IN protocol_version - slurm protocol version of client
  * RET 0 on success, otherwise ESLURM error code
  */
-extern int job_restart(checkpoint_msg_t *ckpt_ptr, uid_t uid, slurm_fd_t conn_fd,
+extern int job_restart(checkpoint_msg_t *ckpt_ptr, uid_t uid, int conn_fd,
 		       uint16_t protocol_version)
 {
 	struct job_record *job_ptr;
diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h
index d343942c1cc..5e610c1dd12 100644
--- a/src/slurmctld/slurmctld.h
+++ b/src/slurmctld/slurmctld.h
@@ -1238,7 +1238,7 @@ extern int job_hold_by_qos_id(uint32_t qos_id);
 
 /* Perform checkpoint operation on a job */
 extern int job_checkpoint(checkpoint_msg_t *ckpt_ptr, uid_t uid,
-			  slurm_fd_t conn_fd, uint16_t protocol_version);
+			  int conn_fd, uint16_t protocol_version);
 
 /* log the completion of the specified job */
 extern void job_completion_logger(struct job_record  *job_ptr, bool requeue);
@@ -1319,7 +1319,7 @@ extern void job_post_resize_acctg(struct job_record *job_ptr);
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_restart(checkpoint_msg_t *ckpt_ptr, uid_t uid,
-		       slurm_fd_t conn_fd, uint16_t protocol_version);
+		       int conn_fd, uint16_t protocol_version);
 
 /*
  * job_signal - signal the specified job
@@ -1342,7 +1342,9 @@ extern int job_signal(uint32_t job_id, uint16_t signal, uint16_t flags,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_step_checkpoint(checkpoint_msg_t *ckpt_ptr,
-		uid_t uid, slurm_fd_t conn_fd, uint16_t protocol_version);
+			       uid_t uid,
+			       int conn_fd,
+			       uint16_t protocol_version);
 
 /*
  * job_step_checkpoint_comp - note job step checkpoint completion
@@ -1353,7 +1355,9 @@ extern int job_step_checkpoint(checkpoint_msg_t *ckpt_ptr,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_step_checkpoint_comp(checkpoint_comp_msg_t *ckpt_ptr,
-		uid_t uid, slurm_fd_t conn_fd, uint16_t protocol_version);
+				    uid_t uid,
+				    int conn_fd,
+				    uint16_t protocol_version);
 /*
  * job_step_checkpoint_task_comp - note task checkpoint completion
  * IN ckpt_ptr - checkpoint task complete status message
@@ -1363,7 +1367,9 @@ extern int job_step_checkpoint_comp(checkpoint_comp_msg_t *ckpt_ptr,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_step_checkpoint_task_comp(checkpoint_task_comp_msg_t *ckpt_ptr,
-		uid_t uid, slurm_fd_t conn_fd, uint16_t protocol_version);
+					 uid_t uid,
+					 int conn_fd,
+					 uint16_t protocol_version);
 
 /*
  * job_str_signal - signal the specified job
@@ -1394,10 +1400,10 @@ extern int job_str_signal(char *job_id_str, uint16_t signal, uint16_t flags,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid,
-		       slurm_fd_t conn_fd, bool indf_susp,
+		       int conn_fd, bool indf_susp,
 		       uint16_t protocol_version);
 extern int job_suspend2(suspend_msg_t *sus_ptr, uid_t uid,
-			slurm_fd_t conn_fd, bool indf_susp,
+			int conn_fd, bool indf_susp,
 			uint16_t protocol_version);
 
 /*
@@ -1447,7 +1453,7 @@ extern int job_req_node_filter(struct job_record *job_ptr,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_requeue(uid_t uid, uint32_t job_id,
-                       slurm_fd_t conn_fd, uint16_t protocol_version,
+                       int conn_fd, uint16_t protocol_version,
                        bool preempt, uint32_t state);
 
 /*
@@ -1460,8 +1466,8 @@ extern int job_requeue(uid_t uid, uint32_t job_id,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_requeue2(uid_t uid, requeue_msg_t *req_ptr,
-                       slurm_fd_t conn_fd, uint16_t protocol_version,
-                       bool preempt);
+                        int conn_fd, uint16_t protocol_version,
+                        bool preempt);
 
 /*
  * job_set_top - Move the specified job to the top of the queue (at least
@@ -1474,7 +1480,7 @@ extern int job_requeue2(uid_t uid, requeue_msg_t *req_ptr,
  * IN protocol_version - slurm protocol version of client
  * RET 0 on success, otherwise ESLURM error code
  */
-extern int job_set_top(top_job_msg_t *top_ptr, uid_t uid, slurm_fd_t conn_fd,
+extern int job_set_top(top_job_msg_t *top_ptr, uid_t uid, int conn_fd,
 		       uint16_t protocol_version);
 
 /*
diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c
index a6590a92f43..cfd005ddeb6 100644
--- a/src/slurmctld/step_mgr.c
+++ b/src/slurmctld/step_mgr.c
@@ -3006,7 +3006,7 @@ extern int kill_step_on_node(struct job_record  *job_ptr,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_step_checkpoint(checkpoint_msg_t *ckpt_ptr,
-			       uid_t uid, slurm_fd_t conn_fd,
+			       uid_t uid, int conn_fd,
 			       uint16_t protocol_version)
 {
 	int rc = SLURM_SUCCESS;
@@ -3085,7 +3085,7 @@ extern int job_step_checkpoint(checkpoint_msg_t *ckpt_ptr,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_step_checkpoint_comp(checkpoint_comp_msg_t *ckpt_ptr,
-				    uid_t uid, slurm_fd_t conn_fd,
+				    uid_t uid, int conn_fd,
 				    uint16_t protocol_version)
 {
 	int rc = SLURM_SUCCESS;
@@ -3143,7 +3143,7 @@ extern int job_step_checkpoint_comp(checkpoint_comp_msg_t *ckpt_ptr,
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_step_checkpoint_task_comp(checkpoint_task_comp_msg_t *ckpt_ptr,
-					 uid_t uid, slurm_fd_t conn_fd,
+					 uid_t uid, int conn_fd,
 					 uint16_t protocol_version)
 {
 	int rc = SLURM_SUCCESS;
diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c
index e07553fac82..6165d40568d 100644
--- a/src/slurmd/slurmd/slurmd.c
+++ b/src/slurmd/slurmd/slurmd.c
@@ -137,7 +137,7 @@ static pthread_cond_t  active_cond    = PTHREAD_COND_INITIALIZER;
 static pthread_mutex_t fork_mutex     = PTHREAD_MUTEX_INITIALIZER;
 
 typedef struct connection {
-	slurm_fd_t fd;
+	int fd;
 	slurm_addr_t *cli_addr;
 } conn_t;
 
@@ -171,7 +171,7 @@ static void      _destroy_conf(void);
 static int       _drain_node(char *reason);
 static void      _fill_registration_msg(slurm_node_registration_status_msg_t *);
 static uint64_t  _get_int(const char *my_str);
-static void      _handle_connection(slurm_fd_t fd, slurm_addr_t *client);
+static void      _handle_connection(int fd, slurm_addr_t *client);
 static void      _hup_handler(int);
 static void      _increment_thd_count(void);
 static void      _init_conf(void);
@@ -452,7 +452,7 @@ static void
 _msg_engine(void)
 {
 	slurm_addr_t *cli;
-	slurm_fd_t sock;
+	int sock;
 
 	msg_pthread = pthread_self();
 	slurmd_req(NULL);	/* initialize timer */
@@ -537,8 +537,7 @@ _wait_for_all_threads(int secs)
 	verbose("all threads complete");
 }
 
-static void
-_handle_connection(slurm_fd_t fd, slurm_addr_t *cli)
+static void _handle_connection(int fd, slurm_addr_t *cli)
 {
 	int            rc;
 	pthread_attr_t attr;
@@ -1400,8 +1399,8 @@ _create_msg_socket(void)
 {
 	char* node_addr;
 
-	slurm_fd_t ld = slurm_init_msg_engine_addrname_port(conf->node_addr,
-							  conf->port);
+	int ld = slurm_init_msg_engine_addrname_port(conf->node_addr,
+						     conf->port);
 	if (conf->node_addr == NULL)
 		node_addr = "*";
 	else
diff --git a/src/slurmd/slurmd/slurmd.h b/src/slurmd/slurmd/slurmd.h
index da27892354b..49899c0f3cd 100644
--- a/src/slurmd/slurmd/slurmd.h
+++ b/src/slurmd/slurmd/slurmd.h
@@ -123,7 +123,7 @@ typedef struct slurmd_config {
 	char         *task_prolog;	/* per-task prolog script          */
 	char         *task_epilog;	/* per-task epilog script          */
 	int           port;		/* local slurmd port               */
-	slurm_fd_t      lfd;		/* slurmd listen file descriptor   */
+	int           lfd;		/* slurmd listen file descriptor   */
 	pid_t         pid;		/* server pid                      */
 	log_options_t log_opts;         /* current logging options         */
 	uint16_t      log_fmt;          /* Log file timestamp format flag  */
diff --git a/src/slurmd/slurmstepd/io.c b/src/slurmd/slurmstepd/io.c
index bb525f4ca51..c15a5f78878 100644
--- a/src/slurmd/slurmstepd/io.c
+++ b/src/slurmd/slurmstepd/io.c
@@ -188,7 +188,7 @@ struct task_read_info {
 struct window_info {
 	stepd_step_task_info_t *task;
 	stepd_step_rec_t *job;
-	slurm_fd_t pty_fd;
+	int pty_fd;
 };
 #ifdef HAVE_PTY_H
 static void  _spawn_window_manager(stepd_step_task_info_t *task, stepd_step_rec_t *job);
@@ -859,7 +859,7 @@ static void
 _spawn_window_manager(stepd_step_task_info_t *task, stepd_step_rec_t *job)
 {
 	char *host, *port, *rows, *cols;
-	slurm_fd_t pty_fd;
+	int pty_fd;
 	slurm_addr_t pty_addr;
 	uint16_t port_u;
 	struct window_info *win_info;
diff --git a/src/slurmdbd/backup.c b/src/slurmdbd/backup.c
index ab6776a323c..1e27cfd5709 100644
--- a/src/slurmdbd/backup.c
+++ b/src/slurmdbd/backup.c
@@ -50,7 +50,7 @@ bool primary_resumed = false;
 bool backup = false;
 bool have_control = false;
 
-static slurm_fd_t  slurmdbd_fd         = -1;
+static int slurmdbd_fd = -1;
 
 /* Open a connection to the Slurm DBD and set slurmdbd_fd */
 static void _open_slurmdbd_fd(slurm_addr_t dbd_addr)
diff --git a/src/slurmdbd/proc_req.c b/src/slurmdbd/proc_req.c
index bfa7d020eed..d908e224119 100644
--- a/src/slurmdbd/proc_req.c
+++ b/src/slurmdbd/proc_req.c
@@ -2922,7 +2922,7 @@ static int   _register_ctld(slurmdbd_conn_t *slurmdbd_conn,
 #if 0
 	{
 		/* Code to validate communications back to slurmctld */
-		slurm_fd_t fd;
+		int fd;
 		slurm_set_addr_char(&ctld_address, register_ctld_msg->port, ip);
 		fd =  slurm_open_msg_conn(&ctld_address);
 		if (fd < 0) {
diff --git a/src/slurmdbd/proc_req.h b/src/slurmdbd/proc_req.h
index 76a7a6cb549..7ab727aaa0f 100644
--- a/src/slurmdbd/proc_req.h
+++ b/src/slurmdbd/proc_req.h
@@ -48,7 +48,7 @@ typedef struct {
 	uint16_t ctld_port; /* slurmctld_port */
 	void *db_conn; /* database connection */
 	char ip[32];
-	slurm_fd_t newsockfd; /* socket connection descriptor */
+	int newsockfd; /* socket connection descriptor */
 	uint16_t orig_port;
 	uint16_t rpc_version; /* version of rpc */
 	char *tres_str;
diff --git a/src/slurmdbd/rpc_mgr.c b/src/slurmdbd/rpc_mgr.c
index a032fb47bee..487b1becfa8 100644
--- a/src/slurmdbd/rpc_mgr.c
+++ b/src/slurmdbd/rpc_mgr.c
@@ -67,9 +67,9 @@
 #define MAX_MSG_SIZE     (16*1024*1024)
 
 /* Local functions */
-static bool   _fd_readable(slurm_fd_t fd);
+static bool   _fd_readable(int fd);
 static void   _free_server_thread(pthread_t my_tid);
-static int    _send_resp(slurm_fd_t fd, Buf buffer);
+static int    _send_resp(int fd, Buf buffer);
 static void * _service_connection(void *arg);
 static void   _sig_handler(int signal);
 static int    _tot_wait (struct timeval *start_time);
@@ -87,7 +87,7 @@ static pthread_cond_t  thread_count_cond = PTHREAD_COND_INITIALIZER;
 extern void *rpc_mgr(void *no_data)
 {
 	pthread_attr_t thread_attr_rpc_req;
-	slurm_fd_t sockfd, newsockfd;
+	int sockfd, newsockfd;
 	int i, retry_cnt, sigarray[] = {SIGUSR1, 0};
 	slurm_addr_t cli_addr;
 	slurmdbd_conn_t *conn_arg = NULL;
@@ -317,7 +317,7 @@ extern Buf make_dbd_rc_msg(uint16_t rpc_version,
 	return buffer;
 }
 
-static int _send_resp(slurm_fd_t fd, Buf buffer)
+static int _send_resp(int fd, Buf buffer)
 {
 	uint32_t msg_size, nw_size;
 	ssize_t msg_wrote;
@@ -365,7 +365,7 @@ static int _tot_wait (struct timeval *start_time)
 }
 
 /* Wait until a file is readable, return false if can not be read */
-static bool _fd_readable(slurm_fd_t fd)
+static bool _fd_readable(int fd)
 {
 	struct pollfd ufds;
 	int rc;
@@ -407,7 +407,7 @@ static bool _fd_readable(slurm_fd_t fd)
 
 /* Wait until a file is writeable,
  * RET false if can not be written to within 5 seconds */
-extern bool fd_writeable(slurm_fd_t fd)
+extern bool fd_writeable(int fd)
 {
 	struct pollfd ufds;
 	int msg_timeout = 5000;
diff --git a/src/slurmdbd/rpc_mgr.h b/src/slurmdbd/rpc_mgr.h
index b8a1f691817..4b9d85b641c 100644
--- a/src/slurmdbd/rpc_mgr.h
+++ b/src/slurmdbd/rpc_mgr.h
@@ -42,7 +42,7 @@
 #include "src/common/pack.h"
 #include "src/common/assoc_mgr.h"
 
-extern bool fd_writeable(slurm_fd_t fd);
+extern bool fd_writeable(int fd);
 
 /* Return a buffer containing a DBD_RC (return code) message
  * caller must free returned buffer */
diff --git a/src/slurmdbd/slurmdbd.c b/src/slurmdbd/slurmdbd.c
index 949cc418701..7805218093e 100644
--- a/src/slurmdbd/slurmdbd.c
+++ b/src/slurmdbd/slurmdbd.c
@@ -735,7 +735,7 @@ static void *_commit_handler(void *db_conn)
 static int _send_slurmctld_register_req(slurmdb_cluster_rec_t *cluster_rec)
 {
 	slurm_addr_t ctld_address;
-	slurm_fd_t fd;
+	int fd;
 	int rc = SLURM_SUCCESS;
 
 	slurm_set_addr_char(&ctld_address, cluster_rec->control_port,
diff --git a/src/srun/libsrun/allocate.c b/src/srun/libsrun/allocate.c
index 0a3b5d8b624..c898a76e3c4 100644
--- a/src/srun/libsrun/allocate.c
+++ b/src/srun/libsrun/allocate.c
@@ -592,18 +592,16 @@ existing_allocation(void)
 }
 
 /* Set up port to handle messages from slurmctld */
-slurm_fd_t
-slurmctld_msg_init(void)
+int slurmctld_msg_init(void)
 {
 	slurm_addr_t slurm_address;
 	uint16_t port;
-	static slurm_fd_t slurmctld_fd   = (slurm_fd_t) 0;
+	static int slurmctld_fd = -1;
 	uint16_t *ports;
 
-	if (slurmctld_fd)	/* May set early for queued job allocation */
+	if (slurmctld_fd >= 0)	/* May set early for queued job allocation */
 		return slurmctld_fd;
 
-	slurmctld_fd = -1;
 	slurmctld_comm_addr.port = 0;
 
 	if ((ports = slurm_get_srun_port_range()))
diff --git a/src/srun/libsrun/allocate.h b/src/srun/libsrun/allocate.h
index b10fbb364cb..9cabc7a7ff4 100644
--- a/src/srun/libsrun/allocate.h
+++ b/src/srun/libsrun/allocate.h
@@ -72,7 +72,7 @@ int cleanup_allocation();
 int allocate_test(void);
 
 /* Set up port to handle messages from slurmctld */
-slurm_fd_t slurmctld_msg_init(void);
+int slurmctld_msg_init(void);
 
 /*
  * Create a job_desc_msg_t object, filled in from the current srun options
diff --git a/src/srun/libsrun/srun_job.h b/src/srun/libsrun/srun_job.h
index 8f0d0d8664f..02cd9263f0e 100644
--- a/src/srun/libsrun/srun_job.h
+++ b/src/srun/libsrun/srun_job.h
@@ -149,6 +149,6 @@ extern void fini_srun(srun_job_t *job, bool got_alloc, uint32_t *global_rc,
 void    job_update_io_fnames(srun_job_t *j);
 
 /* Set up port to handle messages from slurmctld */
-slurm_fd_t slurmctld_msg_init(void);
+int slurmctld_msg_init(void);
 
 #endif /* !_HAVE_JOB_H */
-- 
GitLab