How does the digestive system maintain homeostasis?

How does the digestive system maintain homeostasis?