US President Donald Trump signed the bill ending the record 43-day government shutdown and resuming federal operations.