Changed function api to account for linux api.
Added example code to show behavior.
Backpatched old examples.