Index: uspace/lib/libc/generic/libc.c
===================================================================
--- uspace/lib/libc/generic/libc.c	(revision 81342f721696310b9531caaff48b0e5a37182a5e)
+++ uspace/lib/libc/generic/libc.c	(revision 622cdbe2a7dc23ef6127914195e2c37544dba958)
@@ -80,4 +80,5 @@
 		__stdio_init(0, NULL);
 	} else {
+		(void) chdir(__pcb->cwd);
 		argc = __pcb->argc;
 		argv = __pcb->argv;
Index: uspace/lib/libc/generic/loader.c
===================================================================
--- uspace/lib/libc/generic/loader.c	(revision 81342f721696310b9531caaff48b0e5a37182a5e)
+++ uspace/lib/libc/generic/loader.c	(revision 622cdbe2a7dc23ef6127914195e2c37544dba958)
@@ -101,4 +101,39 @@
 }
 
+/** Set current working directory for the loaded task.
+ *
+ * Sets the current working directory for the loaded task.
+ *
+ * @param ldr  Loader connection structure.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_set_cwd(loader_t *ldr)
+{
+	char *cwd;
+	size_t len;
+
+	cwd = (char *) malloc(MAX_PATH_LEN + 1);
+	if (!cwd)
+		return ENOMEM;
+	if (!getcwd(cwd, MAX_PATH_LEN + 1))
+		str_cpy(cwd, MAX_PATH_LEN + 1, "/"); 
+	len = str_length(cwd);
+	
+	ipc_call_t answer;
+	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_CWD, &answer);
+	int rc = async_data_write_start(ldr->phone_id, cwd, len);
+	free(cwd);
+	if (rc != EOK) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	
+	ipcarg_t retval;
+	async_wait_for(req, &retval);
+	return (int) retval;
+}
+
 /** Set pathname of the program to load.
  *
Index: uspace/lib/libc/generic/task.c
===================================================================
--- uspace/lib/libc/generic/task.c	(revision 81342f721696310b9531caaff48b0e5a37182a5e)
+++ uspace/lib/libc/generic/task.c	(revision 622cdbe2a7dc23ef6127914195e2c37544dba958)
@@ -89,4 +89,9 @@
 		goto error;
 	
+	/* Send spawner's current working directory. */
+	rc = loader_set_cwd(ldr);
+	if (rc != EOK)
+		goto error;
+	
 	/* Send program pathname. */
 	rc = loader_set_pathname(ldr, path);
@@ -98,5 +103,4 @@
 	if (rc != EOK)
 		goto error;
-	
 	
 	/* Send default files */
Index: uspace/lib/libc/include/ipc/loader.h
===================================================================
--- uspace/lib/libc/include/ipc/loader.h	(revision 81342f721696310b9531caaff48b0e5a37182a5e)
+++ uspace/lib/libc/include/ipc/loader.h	(revision 622cdbe2a7dc23ef6127914195e2c37544dba958)
@@ -41,4 +41,5 @@
 	LOADER_HELLO = IPC_FIRST_USER_METHOD,
 	LOADER_GET_TASKID,
+	LOADER_SET_CWD,
 	LOADER_SET_PATHNAME,
 	LOADER_SET_ARGS,
Index: uspace/lib/libc/include/loader/loader.h
===================================================================
--- uspace/lib/libc/include/loader/loader.h	(revision 81342f721696310b9531caaff48b0e5a37182a5e)
+++ uspace/lib/libc/include/loader/loader.h	(revision 622cdbe2a7dc23ef6127914195e2c37544dba958)
@@ -49,4 +49,5 @@
 extern loader_t *loader_connect(void);
 extern int loader_get_task_id(loader_t *, task_id_t *);
+extern int loader_set_cwd(loader_t *);
 extern int loader_set_pathname(loader_t *, const char *);
 extern int loader_set_args(loader_t *, char *const[]);
Index: uspace/lib/libc/include/loader/pcb.h
===================================================================
--- uspace/lib/libc/include/loader/pcb.h	(revision 81342f721696310b9531caaff48b0e5a37182a5e)
+++ uspace/lib/libc/include/loader/pcb.h	(revision 622cdbe2a7dc23ef6127914195e2c37544dba958)
@@ -52,4 +52,7 @@
 	/** Program entry point. */
 	entry_point_t entry;
+
+	/** Current working directory. */
+	char *cwd;
 	
 	/** Number of command-line arguments. */
Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision 81342f721696310b9531caaff48b0e5a37182a5e)
+++ uspace/srv/loader/main.c	(revision 622cdbe2a7dc23ef6127914195e2c37544dba958)
@@ -72,4 +72,7 @@
 static pcb_t pcb;
 
+/** Current working directory */
+static char *cwd = NULL;
+
 /** Number of arguments */
 static int argc = 0;
@@ -115,4 +118,32 @@
 }
 
+/** Receive a call setting the current working directory.
+ *
+ * @param rid
+ * @param request
+ */
+static void ldr_set_cwd(ipc_callid_t rid, ipc_call_t *request)
+{
+	ipc_callid_t callid;
+	size_t len;
+	
+	if (!async_data_write_receive(&callid, &len)) {
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+	
+	cwd = malloc(len + 1);
+	if (!cwd) {
+		ipc_answer_0(callid, ENOMEM);
+		ipc_answer_0(rid, ENOMEM);
+		return;
+	}
+	
+	async_data_write_finalize(callid, cwd, len);
+	cwd[len] = '\0';
+	
+	ipc_answer_0(rid, EOK);
+}
 
 /** Receive a call setting pathname of the program to execute.
@@ -313,4 +344,6 @@
 	elf_create_pcb(&prog_info, &pcb);
 	
+	pcb.cwd = cwd;
+	
 	pcb.argc = argc;
 	pcb.argv = argv;
@@ -406,4 +439,7 @@
 		case LOADER_GET_TASKID:
 			ldr_get_taskid(callid, &call);
+			continue;
+		case LOADER_SET_CWD:
+			ldr_set_cwd(callid, &call);
 			continue;
 		case LOADER_SET_PATHNAME:
