U.S. president Donald Trump signed a bill to end the record-long government shutdown, restoring federal operations and pay after 43 days of paralysis.